Error:(1, 0) Plugin with id 'com.android.application' not found

来源:互联网 发布:素描入门教程 知乎 编辑:程序博客网 时间:2024/06/06 02:16

1.遇到这错误:根本原因就是 再 工程目录下 的 build.gradle中没有添加(或没有找到)依赖包(application 包)

解决办法:方法1  。在项目(外层、根)目录的 build.gradle中添加 如下代码

buildscript {    repositories {        jcenter()    }    dependencies {        classpath 'com.android.tools.build:gradle:0.12.+'        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}
方法2:如何导入的项目中是否有 build.gradle文件。是否是导入项目时选错了目录。

个人产生这个错误的原因是:
在svn重新导入代码的时候,没有选择根目录同步,而是在 app:目录下同步的 导致并没有整个项目的 build.gradle文件。即我是因为第二种情况才导致这个错误。

0 0
原创粉丝点击