Gradle version 1.8 is required. Current version is 1.6

后端 未结 11 1009
面向向阳花
面向向阳花 2020-12-09 02:37

There is a new Android Studio update: https://sites.google.com/a/android.com/tools/recent/androidstudio030released

The link says:

The improved per

11条回答
  •  误落风尘
    2020-12-09 02:43

    I took several steps including: downloaded the gradle-1.8-all.zip file and placed it in a new directory off of my user home directory (Windows-7) and named the directory "gradle-1.8". For good measure, I also unzipped the download in this new directory. I also added a user environmental variable "GRADLE_HOME" with a pathway to this new directory.

    I manually edited the "build.gradle" file in the project's top-level directory and entered:

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

    When Android Studio opened the existing project and I did a build or tried to run it, I got the subject error. The final solution, as mentioned by others, was a several step process:

    1. I removed both the "gradle" and the ".gradle" directories.
    2. I rebuilt the project which recreated the ".gradle" directory but not the "gradle" directory. Then, I closed the project and used "File/Import Project" to load the project again. And, I used the "Use customizable gradle wrapper" as suggested.

    This worked. The "gradle" directory was created again in the project's top-level directory. The project builds clean and runs. It would be nice to have step-by-step upgrade instructions for these updates.

提交回复
热议问题