我一直在试图将项目导入到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在哪里?发帖 –