Closed Bug 1098444 Opened 9 years ago Closed 9 years ago

Gradle build fails without ANDROID_HOME env variable set

Categories

(Firefox Build System :: Android Studio and Gradle Integration, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla36

People

(Reporter: mhaigh, Assigned: nalexander)

References

Details

Attachments

(1 file)

When building with gradle, the build fails with the following error.  Luckily it has a fix included - add a file to "/objdir-android/mobile/android/gradle/local.properties" with contents of "sdk.dir=<path-to-sdk-dir>" 

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> 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: 4.485 secs
It's possible this could go in gradle.properties, but this is what's
widely documented.

mhaigh: apply this patch, then |mach build mobile/android/gradle|.
Then verify that $OBJDIR/mobile/android/gradle/local.properties looks
skookum and see if your local gradle build succeeds.
Attachment #8522339 - Flags: feedback?(mhaigh)
Not tablet-related.
No longer blocks: new-tablet-v1
Blocks: intellij
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/fcd73aacab8c
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 36
Comment on attachment 8522339 [details] [diff] [review]
Add local.properties with sdk.dir for Gradle.

Review of attachment 8522339 [details] [diff] [review]:
-----------------------------------------------------------------

just clearing the feedback flag
Attachment #8522339 - Flags: feedback?(mhaigh) → feedback+
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 36 → mozilla36
You need to log in before you can comment on or make changes to this bug.