Gradle version 1.10 is required. Current version is 2.0

后端 未结 8 964
傲寒
傲寒 2020-12-02 08:50

I am trying to use latest Gradle version (2.0), however I keep getting this message when hitting gradle build in terminal. Why is it asking for 1.10 version

相关标签:
8条回答
  • 2020-12-02 09:14

    The version of Android gradle plugin needs to be compatible with the version of Gradle. Checkout the version compatibility mapping table.

    compatibility mapping table

    0 讨论(0)
  • 2020-12-02 09:17

    Message: "Gradle version 1.10 is required. Current version is 2.0"

    Occurs when: Attempting to build an Android project that requires 1.10 version of Gradle while using 2.0 version of it as native.

    Solution: Using Gradle Wrapper

    Steps:

    1. Make sure the distributionUrl is specified as gradle-1.10-all.zip at the Gradle-wrapper properties file within the Android project. The file path would be like this:

      MyAndroidProject/gradle/wrapper/gradle-wrapper.properties

    2. Run Gradle Wrapper command at the very top level of the project where the executable scripts (i.e. gradlew and gradlew.bat) are located.

      For Unix-like OS:

      ./gradlew wrapper

      For Windows OS:

      gradlew.bat wrapper

    3. Run build command with Gradle Wrapper.

      For Unix-like OS:

      ./gradlew build

      For Windows OS:

      gradlew.bat build

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