Closed
Bug 1099501
Opened 10 years ago
Closed 10 years ago
package com.android.tools.lint.checks does not exist when building
Categories
(Firefox Build System :: Android Studio and Gradle Integration, defect)
Firefox Build System
Android Studio and Gradle Integration
Tracking
(firefox34 fixed, firefox35 fixed, firefox36 fixed)
RESOLVED
FIXED
mozilla36
People
(Reporter: bnicholson, Assigned: nalexander)
References
Details
Attachments
(3 files, 2 obsolete files)
Building on a new Mac fails for me with the following:
0:37.32 /Users/brian/mozilla/git/build/annotationProcessors/SDKProcessor.java:7: error: package com.android.tools.lint.checks does not exist
0:37.32 import com.android.tools.lint.checks.ApiLookup;
0:37.32 ^
0:37.32 /Users/brian/mozilla/git/build/annotationProcessors/SDKProcessor.java:8: error: package com.android.tools.lint does not exist
0:37.32 import com.android.tools.lint.LintCliClient;
0:37.32 ^
0:37.33 /Users/brian/mozilla/git/build/annotationProcessors/SDKProcessor.java:43: error: cannot find symbol
0:37.33 private static ApiLookup sApiLookup;
0:37.33 ^
0:37.33 symbol: class ApiLookup
0:37.33 location: class SDKProcessor
0:37.45 exthelper.xpt
0:37.50 fastfind.xpt
0:37.60 feeds.xpt
0:37.64 find.xpt
0:37.81 /Users/brian/mozilla/git/build/annotationProcessors/SDKProcessor.java:65: error: cannot find symbol
0:37.81 LintCliClient lintClient = new LintCliClient();
0:37.81 ^
0:37.81 symbol: class LintCliClient
0:37.81 location: class SDKProcessor
0:37.81 /Users/brian/mozilla/git/build/annotationProcessors/SDKProcessor.java:65: error: cannot find symbol
0:37.81 LintCliClient lintClient = new LintCliClient();
0:37.81 ^
0:37.81 symbol: class LintCliClient
0:37.81 location: class SDKProcessor
0:37.81 /Users/brian/mozilla/git/build/annotationProcessors/SDKProcessor.java:66: error: cannot find symbol
0:37.81 sApiLookup = ApiLookup.get(lintClient);
0:37.81 ^
0:37.81 symbol: variable ApiLookup
0:37.81 location: class SDKProcessor
The parent revision of bug 1086693 builds fine.
Flags: needinfo?(nalexander)
Assignee | ||
Comment 1•10 years ago
|
||
Looks like we need added a new pre-requisite. This is part of the Android SDK, or tools; we just need to label which part and publicize the new requirement. snorp?
Flags: needinfo?(nalexander) → needinfo?(snorp)
Comment 2•10 years ago
|
||
The package in in question should be part of the SDK tools, which AFAIK we already suggest is required (https://wiki.mozilla.org/Mobile/Fennec/Android#Install_Android_SDK).
Flags: needinfo?(snorp)
Assignee | ||
Comment 3•10 years ago
|
||
In certain configurations, in particular when installing the Android SDK
using HomeBrew, one sees a configuration with symlinks like:
[brian@brian-macbook git]$ ls -l /usr/local/Cellar/android-sdk/23.0.2/
total 72
...
lrwxr-xr-x 1 brian admin 38 Nov 14 16:39 platforms -> ../../../var/lib/android-sdk/platforms
...
drwxr-xr-x 26 brian admin 884 Nov 14 17:43 tools
In this case, we have
ANDROID_SDK=/usr/local/Cellar/android-sdk/23.0.2/platforms/android-21.
When we try to find
/usr/local/Cellar/android-sdk/23.0.2/platforms/android-21/../../tools,
we end up in the /usr/local/var/lib subtree. This patch works around
that by exporting and using ANDROID_TOOLS; ANDROID_TOOLS itself is
extracted using path matching, rather than following .. through the
filesystem.
bnicholson: can you test this? I don't have a tree in a reasonable
state right now.
Attachment #8523980 -
Flags: review?(bnicholson)
Assignee | ||
Comment 4•10 years ago
|
||
In certain configurations, in particular when installing the Android SDK
using HomeBrew, one sees a configuration with symlinks like:
[brian@brian-macbook git]$ ls -l /usr/local/Cellar/android-sdk/23.0.2/
total 72
...
lrwxr-xr-x 1 brian admin 38 Nov 14 16:39 platforms -> ../../../var/lib/android-sdk/platforms
...
drwxr-xr-x 26 brian admin 884 Nov 14 17:43 tools
In this case, we have
ANDROID_SDK=/usr/local/Cellar/android-sdk/23.0.2/platforms/android-21.
When we try to find
/usr/local/Cellar/android-sdk/23.0.2/platforms/android-21/../../tools,
we end up in the /usr/local/var/lib subtree. This patch works around
that by exporting and using ANDROID_TOOLS; ANDROID_TOOLS itself is
extracted using path matching, rather than following .. through the
filesystem.
Attachment #8523980 -
Attachment is obsolete: true
Attachment #8523980 -
Flags: review?(bnicholson)
Attachment #8524013 -
Flags: feedback?(bnicholson)
Comment 5•10 years ago
|
||
Comment on attachment 8524013 [details] [diff] [review]
Export and use ANDROID_TOOLS where appropriate.
Review of attachment 8524013 [details] [diff] [review]:
-----------------------------------------------------------------
::: widget/android/bindings/Makefile.in
@@ +3,5 @@
> # file, You can obtain one at http://mozilla.org/MPL/2.0/.
>
> +annotation_processor_jar_files := $(DEPTH)/build/annotationProcessors/annotationProcessors.jar:$(ANDROID_TOOLS)/lib/lint.jar:$(ANDROID_TOOLS)/lib/lint-checks.jar
> +
> +sdk_processor := \
This part looks fine to me.
Attachment #8524013 -
Flags: review+
Reporter | ||
Comment 6•10 years ago
|
||
Build succeeds with this patch applied, plus the following changes:
diff --git a/mobile/android/base/geckoview.ddf b/mobile/android/base/geckoview.ddf
index 1c3bb98..baaefb9 100644
--- a/mobile/android/base/geckoview.ddf
+++ b/mobile/android/base/geckoview.ddf
@@ -67,7 +67,7 @@ show allResults
check sets [lib] [middle] [main]
-check [lib] directlyIndependentOf [main]
+#check [lib] directlyIndependentOf [main]
# This fails; if this passed, GeckoView would be ready to extract from Fennec.
# check [lib] independentOf [middle]
diff --git a/mobile/android/geckoview_library/Makefile.in b/mobile/android/geckoview_library/Makefile.in
index acdb71d..fd3c4b1 100644
--- a/mobile/android/geckoview_library/Makefile.in
+++ b/mobile/android/geckoview_library/Makefile.in
@@ -3,6 +3,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
INSTALL_TARGETS += GECKOVIEW_LIBRARY
+properties_FLAGS += -DANDROID_SDK_ROOT=$(ANDROID_SDK_ROOT)
GECKOVIEW_LIBRARY_DEST = $(CURDIR)
GECKOVIEW_LIBRARY_FILES := \
.classpath \
diff --git a/mobile/android/geckoview_library/local.properties.in b/mobile/android/geckoview_library/local.properties.in
index 383f158..8112f90 100644
--- a/mobile/android/geckoview_library/local.properties.in
+++ b/mobile/android/geckoview_library/local.properties.in
@@ -8,4 +8,4 @@
# location of the SDK. This is only used by Ant
# For customization when using a Version Control System, please read the
# header note.
-sdk.dir=@ANDROID_SDK@/../../
+sdk.dir=@ANDROID_SDK_ROOT@
Reporter | ||
Comment 7•10 years ago
|
||
Comment on attachment 8524013 [details] [diff] [review]
Export and use ANDROID_TOOLS where appropriate.
Review of attachment 8524013 [details] [diff] [review]:
-----------------------------------------------------------------
WFM with changes in comment 6.
Attachment #8524013 -
Flags: feedback?(bnicholson) → feedback+
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8525526 -
Flags: review?(gps)
Assignee | ||
Comment 9•10 years ago
|
||
/r/807 - Bug 1099501 - Export and use ANDROID_TOOLS where appropriate. r=snorp,bnicholson
/r/809 - Bug 1099345 - Use pattern rule to generate multiple outputs in widget/android/bindings. r=gps
Pull down these commits:
hg pull review -r 073dadd8c1b48ea32f975b2232c2bdeafe315ab4
Assignee | ||
Comment 10•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
QA Contact: nalexander
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
QA Contact: nalexander
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 36
Comment 12•10 years ago
|
||
https://reviewboard.mozilla.org/r/809/#review449
I reviewed this IRL.
Updated•10 years ago
|
Attachment #8525526 -
Flags: review?(gps)
Comment 13•10 years ago
|
||
Assignee | ||
Comment 14•10 years ago
|
||
Attachment #8525526 -
Attachment is obsolete: true
Assignee | ||
Comment 15•10 years ago
|
||
Assignee | ||
Comment 16•10 years ago
|
||
Updated•6 years ago
|
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.
Description
•