[Android-tools-devel] Bug#894284: android-platform-tools-base FTBFS with openjdk-9
Emmanuel Bourg
ebourg at apache.org
Fri Oct 12 14:27:03 BST 2018
The javax.xml.bind errors can be simply fixed by adding a dependency
on jaxb-api:
--- a/repository/build.gradle
+++ b/repository/build.gradle
@@ -9,6 +9,7 @@
compile project(':base:common')
compile 'org.apache.commons:commons-compress:1.8.1'
compile 'com.google.jimfs:jimfs:1.1'
+ compile 'javax.xml.bind:jaxb-api:debian'
testCompile 'junit:junit:4.12'
}
There is another error with Java 10 caused by a change in the return
type of javax.xml.namespace.NamespaceContext.getPrefixes().
It's easily fixed with:
--- a/common/src/main/java/com/android/xml/AndroidXPathFactory.java
+++ b/common/src/main/java/com/android/xml/AndroidXPathFactory.java
@@ -81,7 +81,7 @@
}
@Override
- public Iterator<?> getPrefixes(String namespaceURI) {
+ public Iterator<String> getPrefixes(String namespaceURI) {
if (SdkConstants.NS_RESOURCES.equals(namespaceURI)) {
return mAndroidPrefixes.iterator();
}
Unfortunately there is another issue with SignedJarBuilder:
/build/android-platform-tools-base-2.2.2/sdklib/src/main/java/com/android/sdklib/internal/build/SignedJarBuilder.java:23: error: package sun.security.pkcs is not visible
import sun.security.pkcs.ContentInfo;
^
(package sun.security.pkcs is declared in module java.base, which does not export it to the unnamed module)
/build/android-platform-tools-base-2.2.2/sdklib/src/main/java/com/android/sdklib/internal/build/SignedJarBuilder.java:24: error: package sun.security.pkcs is not visible
import sun.security.pkcs.PKCS7;
^
(package sun.security.pkcs is declared in module java.base, which does not export it to the unnamed module)
/build/android-platform-tools-base-2.2.2/sdklib/src/main/java/com/android/sdklib/internal/build/SignedJarBuilder.java:25: error: package sun.security.pkcs is not visible
import sun.security.pkcs.SignerInfo;
^
(package sun.security.pkcs is declared in module java.base, which does not export it to the unnamed module)
/build/android-platform-tools-base-2.2.2/sdklib/src/main/java/com/android/sdklib/internal/build/SignedJarBuilder.java:26: error: package sun.security.x509 is not visible
import sun.security.x509.AlgorithmId;
^
(package sun.security.x509 is declared in module java.base, which does not export it to the unnamed module)
/build/android-platform-tools-base-2.2.2/sdklib/src/main/java/com/android/sdklib/internal/build/SignedJarBuilder.java:27: error: package sun.security.x509 is not visible
import sun.security.x509.X500Name;
^
(package sun.security.x509 is declared in module java.base, which does not export it to the unnamed module)
More information about the Android-tools-devel
mailing list