您的位置:首页 > 移动开发 > Android开发

Gradle, Android and the ANDROID_HOME SDK location

2015-08-29 14:09 501 查看

http://stackoverflow.com/questions/19794200/gradle-android-and-the-android-home-sdk-location

up vote
41
down vote
favorite
8

we have this project with several modules that is already configured and executes correctly on another developer PC using a wrapper. I cloned the complete git submodules into my machine.

Below it's a directly print of my command line:

$ ./gradlew

FAILURE: Build failed with an exception.

* Where:
Build file '/home/budius/project_name/ActionBar-PullToRefresh/library/build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':ActionBar-PullToRefresh:library'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 6.378 secs

$ echo $ANDROID_HOME
/home/budius/Applications/android-studio/sdk
$

so, as you can see the ANDROID_HOME is there. What else do they want? What's wrong here.

running on Ubuntu 13.04

edit:

I already created a local.properties file with
sdk.dir=<path>
on the project root and it works. But that makes the code harder to port across systems n build server, so the question is still open.

Anyone knows why the ANDROID_HOME is not working and what to do to make it work?

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: