\gradle-wrapper.properties not found in Android Studio

Viewed 14173

\gradle-wrapper.properties not found in Android Studio

I have cloned a git project and I am getting the below issue.

enter image description here

How to resolve it?

3 Answers

Create gradle/wrapper/gradle-wapper.properties and also put the gradle-wrapper.jar there:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip

Or just copy the gradle directory from another project and edit the wrapper version.

If it could be usefull, i will suggest the Official Doc: adding_wrapper

Running the Wrapper task

$ gradle wrapper
> Task :wrapper

BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed

Then The generated Wrapper properties file, gradle/wrapper/gradle-wrapper.properties, stores the information about the Gradle distribution.

first you most create {app name}\gradle\wrapper folder and also create file gradle-wrapper.properties.

add this line to gradle-wrapper.properties:

distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

also you can that folder ({app name}\gradle\wrapper) from another project.

Related