且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 Android Studio 项目中找不到参数的方法 android()

更新时间:2021-12-13 06:18:31

您使用了错误的 build.gradle 文件.

You are using the wrong build.gradle file.

在您的***文件中,您不能定义 android 块.

In your top-level file, you can't define an android block.

只需将这部分移动到 module/build.Gradle 文件中即可.

Just move this part inside the module/build.Gradle file.

android {
compileSdkVersion 17
buildToolsVersion '23.0.0'
}
dependencies {
compile files('app/libs/junit-4.12-JavaDoc.jar')
}
apply plugin: 'maven'