Cordova build changes distributionUrl in gradle-wrapper.properties file

后端 未结 8 1108
小鲜肉
小鲜肉 2020-12-05 06:30

I keep getting the following build exception when I run

 cordova run android --verbose
  • What went wrong: A problem occurred evaluatin
相关标签:
8条回答
  • 2020-12-05 07:23

    You can try out the following to resolve the issue,

    On Windows, Change File -> Settings -> Builds,Execution,Deployment -> Build Tools -> Gradle -> Gradle home path

    On Mac OS, Change Android Studio -> Preferences -> Builds,Execution,Deployment -> Build Tools -> Gradle -> Gradle home path

    Else use default gradle wrapper and edit Project\gradle\wrapper\gradle-wrapper.properties file's distributionUrl like this:

    distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
    
    0 讨论(0)
  • 2020-12-05 07:23

    This was happening to me because I wasn't building with the latest version of cordova-android. so:

    cordova platform rm android
    cordova platform add android@latest
    

    Take not of the @latest directive. Also be sure to update download the latest version of gradle and include it in the appropriate directory, as pointed out in the other answers.

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