小编Evg*_*nia的帖子

找不到Gradle DSL方法:将模块导入项目后'compileSdkVersion()'

我在Android Studio中有一个项目.我需要在这个项目中导入一个模块:https://github.com/square/android-times-square/ 这个包中有一个库和一个样本.我导入了它们.我下载.zip并在Android Studio中执行文件 - >新建 - >导入模块 然后我得到了重叠错误:

Error:(16, 0) Gradle DSL method not found: 'compileSdkVersion()'
Possible causes:
The project 'MyProject' may be using a version of the Android Gradle plug-in that does not contain the method 
(e.g. 'testCompile' was added in 1.1.0).
Upgrade plugin to version 2.3.3 and sync project. The project 'MyProject' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper file. The build file may …
Run Code Online (Sandbox Code Playgroud)

android gradle import-module android-gradle-plugin

3
推荐指数
1
解决办法
2958
查看次数