Could not find method android() for arguments on root project '项目名' of type org.gradle.api.Project.

来源:互联网 发布:淘宝刷客收入揭秘 编辑:程序博客网 时间:2024/05/02 02:44

Could not find method android() for arguments
[build_9m5ezt0p5zo7axieu78rb2u57$_run_closure2@3207872b] on root project ‘xx项目名xxx’ of type org.gradle.api.Project. Open File

解决方案:
添加:
apply plugin: ‘com.android.application’

其是可以理解为该 model 为一个 com.android.application 程序,
也就是应用程序,如果你的 Model 是一个库,那么自然也就是:
apply plugin: ‘com.android.library’

0 0