Gradle version 1.8 is required. Current version is 1.9

前端 未结 2 978
醉梦人生
醉梦人生 2021-01-17 03:23

Android Studio just updated itself to 0.4.2, and now fails parsing my project with the message:

Gradle version 1.8 is required. Current version is 1.9

相关标签:
2条回答
  • 2021-01-17 03:45

    Update distributionUrl mentioned in your YOUR_PROJECT/gradle/gradle-wrapper.properties file, Studio(0.4.2) should automatically prompt for auto fix while gradle sync but if it didn't do it manually. distributionUrl should be like

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

    Update all build.gradle files inside your project or if you are using top level build.gradle file for defining gradle version update in that only with

    buildscript {
        repositories {
            mavenCentral()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:0.7.+'
        }
    }
    

    Android Studio(0.4.2) only supports Gradle 1.9 which can be defined using gradle:0.7.+ in dependency classpath.

    0 讨论(0)
  • 2021-01-17 03:56

    In your project root is a gradle folder. Within that folder is a file 'gradle-wrapper.properties' open that file in a text editor and change the version in the distributionUrl from 1.8 to 1.9.

    Then re-open your project.

    0 讨论(0)
提交回复
热议问题