Closed arunkumar413 closed 6 months ago
Try ./mach bootstrap-android --build
?
@jdm, Tried ./mach bootstrap-android --build as well
arun@arun-HP-Pavilion-g6-Notebook-PC:~/Documents/servo$ ./mach bootstrap-android --build
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 5 more
Error running mach:
['bootstrap-android', '--build']
The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You should consider filing a bug for this issue.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
CalledProcessError: Command '[u'/home/arun/Documents/servo/android-toolchains/sdk/tools/bin/sdkmanager', u'platforms;android-18']' returned non-zero exit status 1
File "/home/arun/Documents/servo/python/servo/bootstrap_commands.py", line 196, in bootstrap_android
subprocess.check_call(sdkmanager)
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
arun@arun-HP-Pavilion-g6-Notebook-PC:~/Documents/servo$
Below is the config Used. Should I strictly use ndk version 12/12B?
android api level: 18 android NDK: 19.2.5xxxx
export ANDROID_SDK="/home/arun/Android/Sdk" export ANDROID_NDK="/home/arun/Android/Sdk/ndk-bundle" export PATH=$PATH:$ANDROID_SDK/platform-tools
Also I'm on linux mint. Which of the following commands should I use?
sudo apt-get install curl ia32-libs ant
Or
sudo apt-get install curl libc6:i386 ant lib32z1 openjdk-8-jdk
@arunkumar413 I believe the Java exception you are seeing is caused by using JDK9 or JDK10, which do not appear to work with the android NDK according to https://stackoverflow.com/questions/46402772/failed-to-install-android-sdk-java-lang-noclassdeffounderror-javax-xml-bind-a.
And yes, Servo will not build with an NDK other than 12.
@jdm, I tried again with the correct version of ndk and got a null pointer exception
A problem occurred configuring project ':servoapp'.
java.lang.NullPointerException (no error message)
arun@arun-HP-Pavilion-g6-Notebook-PC:~/Documents/servo$ ./mach build --release --android --debug
rustc 1.34.0-nightly (0ea22717a 2019-03-02)
info: component 'rust-std' for target 'armv7-linux-androideabi' is up to date
warning: clang: warning: argument unused during compilation: '-L/home/arun/Downloads/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x'
Compiling script v0.0.1 (/home/arun/Documents/servo/components/script)
Compiling mozjs_sys v0.61.6
Compiling mozjs v0.10.0
warning: redundant linker flag specified for library `stdc++`
Compiling malloc_size_of v0.0.1 (/home/arun/Documents/servo/components/malloc_size_of)
Compiling servo_url v0.0.1 (/home/arun/Documents/servo/components/url)
Compiling msg v0.0.1 (/home/arun/Documents/servo/components/msg)
Compiling range v0.0.1 (/home/arun/Documents/servo/components/range)
Compiling pixels v0.0.1 (/home/arun/Documents/servo/components/pixels)
Compiling style_traits v0.0.1 (/home/arun/Documents/servo/components/style_traits)
Compiling webvr_traits v0.0.1 (/home/arun/Documents/servo/components/webvr_traits)
Compiling devtools_traits v0.0.1 (/home/arun/Documents/servo/components/devtools_traits)
Compiling background_hang_monitor v0.0.1 (/home/arun/Documents/servo/components/background_hang_monitor)
Compiling gfx_traits v0.0.1 (/home/arun/Documents/servo/components/gfx_traits)
Compiling embedder_traits v0.0.1 (/home/arun/Documents/servo/components/embedder_traits)
Compiling servo_geometry v0.0.1 (/home/arun/Documents/servo/components/geometry)
Compiling devtools v0.0.1 (/home/arun/Documents/servo/components/devtools)
Compiling bluetooth_traits v0.0.1 (/home/arun/Documents/servo/components/bluetooth_traits)
Compiling servo_config v0.0.1 (/home/arun/Documents/servo/components/config)
Compiling net_traits v0.0.1 (/home/arun/Documents/servo/components/net_traits)
Compiling canvas_traits v0.0.1 (/home/arun/Documents/servo/components/canvas_traits)
Compiling profile_traits v0.0.1 (/home/arun/Documents/servo/components/profile_traits)
Compiling style v0.0.1 (/home/arun/Documents/servo/components/style)
Compiling bluetooth v0.0.1 (/home/arun/Documents/servo/components/bluetooth)
Compiling net v0.0.1 (/home/arun/Documents/servo/components/net)
Compiling profile v0.0.1 (/home/arun/Documents/servo/components/profile)
Compiling script_traits v0.0.1 (/home/arun/Documents/servo/components/script_traits)
Compiling webvr v0.0.1 (/home/arun/Documents/servo/components/webvr)
Compiling metrics v0.0.1 (/home/arun/Documents/servo/components/metrics)
Compiling webdriver_server v0.0.1 (/home/arun/Documents/servo/components/webdriver_server)
Compiling compositing v0.0.1 (/home/arun/Documents/servo/components/compositing)
Compiling canvas v0.0.1 (/home/arun/Documents/servo/components/canvas)
Compiling script_layout_interface v0.0.1 (/home/arun/Documents/servo/components/script_layout_interface)
Compiling gfx v0.0.1 (/home/arun/Documents/servo/components/gfx)
Compiling layout v0.0.1 (/home/arun/Documents/servo/components/layout)
Compiling layout_traits v0.0.1 (/home/arun/Documents/servo/components/layout_traits)
Compiling constellation v0.0.1 (/home/arun/Documents/servo/components/constellation)
Compiling layout_thread v0.0.1 (/home/arun/Documents/servo/components/layout_thread)
Compiling libservo v0.0.1 (/home/arun/Documents/servo/components/servo)
Compiling simpleservo v0.0.1 (/home/arun/Documents/servo/ports/libsimpleservo/api)
Compiling simpleservo_jniapi v0.0.1 (/home/arun/Documents/servo/ports/libsimpleservo/jniapi)
Finished release [optimized] target(s) in 52m 34s
Swapping prefs
<-------------> 0% INITIALIZING [0s]
> settings
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/home/arun/.gradle/wrapper/dists/gradle-4.4-all/9br9xq1tocpiv8o6njlyu5op1/gradle-4.4/lib/groovy-all-2.4.12.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':servoapp'.
> java.lang.NullPointerException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 36s
Packaging Android exited with return value 1
The most useful information will come from making this change that I suggested: https://mozilla.logbot.info/servo/20190320#c16112106
@jdm, I tried as suggested by you. Still I got the same error. Below is how I modified the package_commands.py file to include --stacktrace and --debug If this is wrong please let me know the correct way to do it.
Rather than pasting the whole file, it's much easier to paste the result of git diff
like this:
diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py
index 83f308f181..5904931f8f 100644
--- a/python/servo/package_commands.py
+++ b/python/servo/package_commands.py
@@ -276,7 +276,7 @@ class PackageCommands(CommandBase):
apk_task_name = ":servoapp" + variant
aar_task_name = ":servoview" + variant
maven_task_name = ":servoview:uploadArchive"
- argv = ["./gradlew", "--no-daemon", apk_task_name, aar_task_name]
+ argv = ["./gradlew", "--no-daemon", "--stacktrace", "--debug", apk_task_name, aar_task_name]
if maven:
argv.append(maven_task_name)
try:
Thanks, @jdm. made the changes and this (https://gist.github.com/arunkumar413/efc3cd5eca3ca2acfe9521ec4ab5a121) is the debug info.
@jdm, Additionally I used the --scan
argument to create a scan of the debug. Here (https://scans.gradle.com/s/56a3rrsrn3sca/) is the link to the gradle scan
bootstrap-android
is no more.
Hi All,
I tried to do an android build but got the below error when I ran the command ./mach bootstrap-android