Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while importing android project ("Gradle location is incorrect" or "Cause: unexpected end of block data")

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: enter image description here

2) And secondly, if I try to run project I get the message: enter image description here

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.

like image 907
dawid gdanski Avatar asked Nov 06 '13 15:11

dawid gdanski


People also ask

Where is the location of gradle?

Then follow these steps: goto Files>Settings in Android Studio. goto Build,Execution,Development>Gradle. choose your gradle path.

Where is gradle location in Android Studio?

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 use gradle from specified location?

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 .


1 Answers

Point to the folder <gradle root folder>/libexec. Things should start working.

like image 190
Abhinav Manchanda Avatar answered Oct 05 '22 01:10

Abhinav Manchanda