【问题标题】:Showing error fix plugin version and sync projects in android studio在 android studio 中显示错误修复插件版本和同步项目
【发布时间】:2016-05-20 06:03:04
【问题描述】:

我是Android Studio的新手,当我突然创建一个新项目时,我收到一条错误消息,即Error:(1, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to "9ba5989c7b283b0ec145cc20641f7155619d6148"

这是我的build.gradle 文件

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "************"
        minSdkVersion 16
        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.1.1'
}

我的 build.gradle(项目)

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.0.0-alpha2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

我已经更新了我的 Android Studio 2.0,但它总是在打开创建项目时显示 Fix plugin version and sync project。请任何人都可以告诉我应该如何解决这个问题。 提前谢谢...

【问题讨论】:

  • 点击该消息进行修复。让它升级所需的插件。

标签: android-studio android-gradle-plugin build.gradle


【解决方案1】:

classpath 'com.android.tools.build:gradle:2.0.0-alpha2' 代替这个使用

classpath 'com.android.tools.build:gradle:2.2.+' 这为我解决了同样的错误!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-30
    • 1970-01-01
    • 1970-01-01
    • 2021-05-21
    相关资源
    最近更新 更多