Android Studio 報錯 plugin is too old

Error:(1, 0) Plugin is too old, please update to a more recent version

在Android Studio中新建項目時,可能會出現以下問題:

Error:(1, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to “3babf96f7dbb45ee4d544c23a3546a1aa59c8aa2”
Fix plugin version and sync project
Open File

解決方法是:
第一步:更改build.gradle文件中

dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'

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

把classpath改爲已經有的版本,我這裏是gradle:1.3.0

第二步:對應工程文件夾gradle\wrapper\,gradle-wrapper.properties文件,修改裏面

distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-all.zip

爲對應的版本,gradle:1.3.0對應的是gradle-2.2-all.zip

需要在C:\Users\xxx.gradle\wrapper\dists\gradle-2.2-all\1vevkra640w3rb9hkuw50q5we文件夾中添加對應gradle-2.2-all.zip壓縮包,只需添加壓縮包,會自動解壓(如果已經有就不用這一步了)。

要下載gradle,可以去http://services.gradle.org/distributions 下載。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章