I want to import Android project in Android Studio and this is where the problem begins: 1) If I set Gradle home and click OK, I get the info:
2) And secondly, if I try to run project I get the message:
Trying both ways result in displaying messages above. I have GRADLE_HOME, JAVA_HOME set correctly and ANDROID_HOME points to "sdk" directory in android-studio directory. Much appreciation for answer with the solution.
Then follow these steps: goto Files>Settings in Android Studio. goto Build,Execution,Development>Gradle. choose your gradle path.
The top-level build.gradle file, located in the root project directory, defines dependencies that apply to all modules in your project. By default, the top-level build file uses the plugins block to define the Gradle dependencies that are common to all modules in the project.
How to configure Android Studio. Open Preferences -> Build, Execution, Deployment -> Gradle . Select Use local gradle distribution and specify Gradle home . On Mac: /usr/local/opt/gradle/libexec in case you installed it via brew .
Point to the folder <gradle root folder>/libexec
. Things should start working.
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