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

来源:互联网 发布:振动分析软件 航空 编辑:程序博客网 时间:2024/05/29 08:28
如果出现如上错误,只需要在build.gradle中添加下面代码即可:buildscript{    repositories{        jcenter()    }    dependencies{        classpath 'com.android.tools.build:gradle:1.5.0'    }}allprojects{    repositories{        jcenter()    }}之前状态:
android {    compileSdkVersion 23    buildToolsVersion "23.0.2"    defaultConfig {        applicationId "com.atguigu.myasynctask"        minSdkVersion 14        targetSdkVersion 23        versionCode 1        versionName "1.0"    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }    }}dependencies {    compile fileTree(dir: 'libs', include: ['*.jar'])    testCompile 'junit:junit:4.12'    compile 'com.android.support:appcompat-v7:23.2.1'}


0 0