Getting a loading wrapper properties error in Android

后端 未结 10 889
逝去的感伤
逝去的感伤 2020-12-07 04:48

I am getting the following error :

\'C:\\Users\\install\\Desktop\\project\\CoMpC2\\gradle\\wrapper\\gradle-wrapper.properties\'.
No value with key \'distribu         


        
相关标签:
10条回答
  • 2020-12-07 04:54

    I had the same / a similar issue. Ideally we should not have to make any changes & Android Studio handles these things automatically.

    For some reason some of my configuration got corrupted because of which every time I created a project it failed with these errors and was only putting the Gradle folder in the Project hierarchy and not generating any of the project files.

    All I did was delete the .gradle, .android, .AndroidStudiox.x folder in this location: C:\Users\username and the next time I loaded Android Studio it reconfigured those dependencies and got rid of the error.

    0 讨论(0)
  • 2020-12-07 04:54

    C:\Users\[Username]\.AndroidStudio4.0\system\ and delete the caches folder.

    After this, create new project and the problem goes away.

    0 讨论(0)
  • 2020-12-07 04:56

    It seems like the distributionUrl is missing in gradle-wrapper.properties of your project. It is shown below:

    #Wed Apr 10 15:27:10 PDT 2013

    distributionBase=GRADLE_USER_HOME

    distributionPath=wrapper/dists

    zipStoreBase=GRADLE_USER_HOME

    zipStorePath=wrapper/dists

    distributionUrl=https://services.gradle.org/distributions/gradle-2.10-all.zip

    0 讨论(0)
  • 2020-12-07 04:56

    Go to C:\Users\\[Username]\\.AndroidStudio4.0\system\ and delete the caches folder.

    After this, create new project and the problem goes away.

    0 讨论(0)
  • 2020-12-07 04:57

    This answer is just an new version of Alok Gupta's Answer

    #Tue Oct 16 17:39:45 IST 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
    

    copy above code inside gradle-wrapper.properties file.

    0 讨论(0)
  • 2020-12-07 04:58

    While the project is loaded in android studio, 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.C:/Program Files/Android/Android Studio2/gradle/gradle-2.10

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