Closed kamstrup closed 10 years ago
You didn't set the ANDROID_HOME env variable as per the docs. On Mar 25, 2014 9:04 PM, "Mikkel Kamstrup Erlandsen" < notifications@github.com> wrote:
Running with unmodified default test project from gdx-setup-jar I get the following from running './gradlew tasks':
$ ./gradlew tasks
:tasks
All tasks runnable from root project
:tasks FAILED
FAILURE: Build failed with an exception.
-
What went wrong: Execution failed for task ':tasks'.
Could not determine the dependencies of task ':android:packageDebug'.
-
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: 7.952 secs
Reply to this email directly or view it on GitHubhttps://github.com/libgdx/libgdx/issues/1550 .
I did, and I also tried unsetting/re-exporting it N times. It's definitely the right path because I copy-pasted it from my working IntelliJ setup.
But I concede that when I unset ANDROID_HOME i continue to get the same error, which seem to indicate that my ANDROID_HOME is somehow not seen by gradlew.
That would be very weird. Do you set the env var immediately followed by executing gradle? e..g
$ export ANDROID_HOME=/your/path/here
$ ./gradlew tasks
?
I tried both with exporting it immediately before like you propose, but also by setting it in my ~/.bash_profile. I am printing out ANDROID_HOME just before the last 'exec' line in gradlew and it is there alright.
Could you pastebin the output from ./gradlew --version
, and also the stacktrace from when it errors on ./gradlew tasks --debug
Yeah, I am digging into the --debug output right now. I found a:
Caused by: java.lang.IllegalStateException: failed to find Build Tools revision 19.0.3
Looking in Android SDK manager I can see that I don't have any Android SDK Build Tools package installed (there are many available). My Android dev setup is working fine however - which is probably because I with Eclipse in Google's ADT Bundle. So I was naively assuming command line building would be working as well.
After installing the Android SDK Build Tools package things started working.
So I guess the bottom line is to add a caveat to the docs to other wayfarers who are coming from Eclipse/ADT Bundle land.
I had a feeling it would be the build tools, its a bit annoying that it doesn't show a small stack on error, but I guess --debug or --info works. Ill add it to the docs.
Sweet. I am already loving the new Gradle world order! :-)
Closing this :)
Running with unmodified default test project from gdx-setup-jar I get the following from running './gradlew tasks':