Gradle location is incorrect error while importing ActionBarsherlock in Android Studio

AndroidActionbarsherlockAndroid Studio

Android Problem Overview


I'm also trying to import the ABS in new updated Android Studio. I'm following this tutorial.

but on step Adding Action Bar Sherlock library to Android Studio im getting the error

Gradle Location is incorrect. here is pic.

enter image description here

When I go to the path C:\Users\Sir John Qadir\ there is no any gradle1.6 folder in there. How to resolve this?

Android Solutions


Solution 1 - Android

If you have installed your gradle with brew then it would be:

/usr/local/Cellar/gradle/<version>/libexec/

Solution 2 - Android

Try using this path:

For Windows

C:\Users\MyHome\.gradle\wrapper\dists\gradle-1.6-bin\<some random folder>\gradle-1.6

For UNIX (Debian, Mac etc.)

~/.gradle/wrapper/dists/gradle-<a-version>-<bin or all>/<some random folder>/gradle-<a-version>

Solution 3 - Android

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

Solution 4 - Android

When using homebrew, instead of (as suggested in other answers):

/usr/local/Cellar/gradle/<version>/libexec/

It's better to use:

/usr/local/opt/gradle/libexec

It's a symlink and will survive brew upgrade.

Solution 5 - Android

Create a build.gradle with:

task getHomeDir << {
	println gradle.gradleHomeDir
}

Then run it with:

gradle getHomeDir

You should see something like:

/usr/local/Cellar/gradle/1.6/libexec

You can use that to populate the Gradle plugin, and you’re off.

http://www.rabblemedia.net/blog/setting-up-gradle-plugin-for-intellij/

Solution 6 - Android

If you use brew to install gradle on mac, then use /usr/local/Cellar/gradle/4.0.1/libexec

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionQadir HussainView Question on Stackoverflow
Solution 1 - AndroidyusufView Answer on Stackoverflow
Solution 2 - Androiduser1817181View Answer on Stackoverflow
Solution 3 - AndroidAbhinav ManchandaView Answer on Stackoverflow
Solution 4 - AndroidRicardo CorreaView Answer on Stackoverflow
Solution 5 - AndroidBadr BellajView Answer on Stackoverflow
Solution 6 - AndroidbegginghardView Answer on Stackoverflow