我一直在試圖將項目導入到Android Studio,這是我卡住的地方,在Stack Overflow上有類似的問題,但它沒有提供解決方案,我的特定錯誤。無法找到方法android()的參數
這是我的錯誤日誌:
C:\<some location>\build.gradle
Error:(24, 1) A problem occurred evaluating root project '<project name>'.
> Could not find method android() for arguments [[email protected]] on root project '<project name>'.
Information:BUILD FAILED
的搖籃同步消息是:
Error:(24, 0) Gradle DSL method not found: 'android()' Possible causes:
The project 'PoojaPeople' may be using a version of Gradle that does not contain the method. Gradle settings The build file may be missing a Gradle plugin. Apply Gradle plugin
我也不太清楚到底在哪這種方法android()
所在。如果它位於應用程序的build.gradle
文件中,那麼我仍然不知道該從哪裏下載。任何幫助表示讚賞。
我build.gradle
是
buildscript {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
android {
compileSdkVersion 17
buildToolsVersion '23.0.0'
}
dependencies {
compile files('app/libs/junit-4.12-JavaDoc.jar')
}
apply plugin: 'maven'
你的build.gradle在哪裏?發帖 –