Android Studio Gradle issue upgrading to version 0.5.0 - Gradle Migrating From 0.8 to 0.9 - Also Android Studio upgrade to 0.8.1

后端 未结 8 2458
名媛妹妹
名媛妹妹 2020-11-27 14:41

After upgrade message states:

Failed to refresh Gradle project \'XXX\'
The project is using an unsupported version of the Android Gradle plug-in (0.8.3).
Ve         


        
8条回答
  •  清歌不尽
    2020-11-27 15:06

    I faced Same problem Migrating into gradle version 1.0.0.. This solution helps me and save the date..

    Update Plugin and Gradle Version Numbers

    The Android Gradle plugin version is typically listed in the top level build.gradle file in the project, and can be updated as follows:

    Let me consider i have version 0.8.. show my build.gradle(project root folder/build.gradle) shows

    dependencies { classpath 'com.android.tools.build:gradle:0.8.+' }

    remove the old version(0.8) and add new version 1.0.0 like this

    dependencies { classpath 'com.android.tools.build:gradle:1.0.0' }

    And also change the gradle/wrapper/gradle-wrapper.properties:

    remove the old distributionUrl and add new url

    distributionUrl=http://services.gradle.org/distributions/gradle-2.2.1-all.zip

    and change the runProguard in project root/app/build.gradle

    BEFORE:

    buildTypes { release { runProguard true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }

    AFTER:

    buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }

    For more information : Migrating gradle Project(click here)

提交回复
热议问题