Unable to get Gradle wrapper properties

帅比萌擦擦* 提交于 2020-07-14 06:34:33

问题


I get the following error when I am trying to import the project.

Unable to get Gradle wrapper properties from: F:\projects\Polyfills\cordova\platforms\android\gradle\wrapper\gradle-wrapper.properties

Would you like to recreate the wrapper using the latest supported Gradle version?

Click 'OK' to recreate files, or 'Cancel' to manually set the path of a local Gradle distribution.


回答1:


It seems like the distributionUrl is missing in gradle-wrapper.properties of your project. gradle-wrapper.properties looks like as follows . please check your path and add distributionUrl inside gradle-wrapper.properties file

#Thu Dec 13 11:43:04 JST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

Possible Solution

Go to File then Settings. Under Settings window choose Build,Execution, Deployment. Then under build tools choose Gradle. Click on use local gradle Distribution. Change gradle home by browsing gradle location eg. ... /gradle/gradle-2.10



来源:https://stackoverflow.com/questions/54471767/unable-to-get-gradle-wrapper-properties

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!