Gradle build errors with Android Studio

前端 未结 3 1757
谎友^
谎友^ 2021-01-12 11:50

When I try to build my project in Android Studio I get the following error, using the gradle plugin provided with the download (v 1.6):

The specified Gradle in

3条回答
  •  星月不相逢
    2021-01-12 12:11

    I had a similar problem and I believe that it was caused by having multiple versions of gradle on my machine. The solution I found was to use the script that Android Studio creates in your project folder (either gradlew (MacOs/Unix) or gradlew.bat (Windows)):

    ./gradlew assemble
    

    This causes the correct version of gradle to be run - i.e. the version that was shipped with Android Studio.

    I haven't tried creating a project within Eclipse, so I'm not sure if these scripts are created when creating your project in that way.

提交回复
热议问题