I try to import an eclipse project into Android studio. In the migration instructions it says "In the following dialog, leave Use gradle wrapper selected and click OK. (You do not need to specify the Gradle home.)"
The problem is that the ""Use gradle wrapper" is unselected and grayed out.
Any suggestions?
Open gradle-wrapper. properties(go to Gradle > wrapper > gradle-wrapper. properties and manually change the distributionUrl property in the file.
The Wrapper shell script and batch file reside in the root directory of a single or multi-project Gradle build. You will need to reference the correct path to those files in case you want to execute the build from a subproject directory e.g. ../../gradlew tasks .
1) Create a new simple project with Android Studio.
2) Find the gradle folder in the new project.
3) Use the export option in eclipse to create the build.gradle script. (Requires at least adt version 22.0)
4) Copy the gradle folder into the project you want to export to Android Studio.
5) Now try to import this project, u shall be able to select the wrapper check box.
This may resolve the problem you asked for, you can also set the Gradle home path and use the other option just fine.
Hope this helps!
I had this issue with a project that I had already previously built using Android Studio. It turned out that selecting the project appended a /gradle
to the path of the directory when searching for a gradle wrapper. Removing the /gradle
allowed me to select the option to use the default gradle wrapper.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With