If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Gradle build fails without ANDROID_HOME env variable set

RESOLVED FIXED in Firefox 36

Status

()

Firefox for Android
Build Config & IDE Support
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: mhaigh, Assigned: nalexander)

Tracking

unspecified
Firefox 36
All
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
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
(Assignee)

Comment 1

3 years ago
Created attachment 8522339 [details] [diff] [review]
Add local.properties with sdk.dir for Gradle.

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: 1014156
(Assignee)

Updated

3 years ago
Blocks: 1041395
(Assignee)

Comment 3

3 years ago
https://hg.mozilla.org/integration/fx-team/rev/fcd73aacab8c
(Assignee)

Updated

3 years ago
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/fcd73aacab8c
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 36
(Reporter)

Comment 5

3 years ago
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+
You need to log in before you can comment on or make changes to this bug.