Gradle version 1.6 is required. Current version is 1.8-20130730220035+0000

前端 未结 7 649
轻奢々
轻奢々 2020-12-24 01:23

Just updated Android-Studio to version 0.2.7 an now I get the error message from the title:

\"e

相关标签:
7条回答
  • 2020-12-24 02:29

    You do not want to manage gradle at a system level, it is better handled per project. Android Studio projects already setup gradle wrapper handling when creating new projects but if you have an older one you can add the same file that Android Studio does. Think of this as an gradle bootstrap file that will download the correct gradle version per project. You can also read up on Gradle Wrapper and generate a shell script called gradlew that will provide gradle-free bootstrapping.

    In gradle/wrapper/gradle-wrapper.properties in your project directory make sure you have:

    #
    #Tue Oct 08 13:40:54 CEST 2013
    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    distributionUrl=http\://services.gradle.org/distributions/gradle-1.7-bin.zip
    

    Then when you go into Gradle you can set it to use the gradle wrapper. This is the default when creating new projects in Android Studio.

    There are at least three approaches to migration or adding Gradle properly and using the new project structure Google and Android Studio has introduced.

    • Create a new project and copy over the code
    • Export from Eclipse to Gradle (deprecated)
    • Import code into Android Studio (recommended)
    • Try to manually get everything in order by creating the correct gradle files and reorganizing the project.

    For now I'm copying the files over to a new project until the tools get a bit better.

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