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

Posted Sharley

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了android 编译错误 Error:(1, 0) Plugin with id 'com.android.application' not found.相关的知识,希望对你有一定的参考价值。

在导入一个项目时,由于它本身的gradle版本比较高,你试用比较旧版本的gradle时就报出Plugin with id ‘com.android.application‘ not found.的错误

如果出现如上错误,只需要在build.gradle中添加下面代码即可:

 (直接加在 android{ } 的外面)

buildscript {
    repositories {
        jcenter() // or mavenCentral()
}

    dependencies {
        classpath com.android.tools.build:gradle:1.5.0
}
}

allprojects {
    repositories {
        jcenter()
    }
}

参考:http://blog.csdn.net/zhengdan66/article/details/50418747#comments

以上是关于android 编译错误 Error:(1, 0) Plugin with id 'com.android.application' not found.的主要内容,如果未能解决你的问题,请参考以下文章

我的Android进阶之旅解决Android Studio 编译NDK项目出错:clang++: error: no such file or directory

我的Android进阶之旅解决Android Studio 编译NDK项目出错:clang++: error: no such file or directory

Android 编译错误:CreateProcess error=206, 文件名或扩展名太长。

Android 编译错误:CreateProcess error=206, 文件名或扩展名太长。

Android 编译错误:CreateProcess error=206, 文件名或扩展名太长。

错误:compileSdkVersion android-21 需要使用 JDK 7 编译 - windows