I am trying to use AndroWish SDK on updated Arch Linux. The java variant I have installed is:
jdk-openjdk 13.0.2.u8
jdk11-openjdk 11.0.6.u10
Previous version (11) is required by gradle.
I have also installed android-sdk version 26.1.1 and gradle version 6.1.1 and have set environmental variable into my .bashrc as follows:
export ANDROID_HOME=/opt/android-sdk
export PATH=${PATH}:${HOME}/bin:${ANDROID_HOME}/tools
The bones tool does not work and does not report any error at all. Trying manually that's what I get:
$ android update project
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
Invalid or unsupported command "update project"
Supported commands are:
android list target
android list avd
android list device
android create avd
android move avd
android delete avd
android list sdk
android update sdk
I do not understand how to run this on my newer android SDK. Moreover the gradlew script does not detect my gradle installation (yet it is in standard position /usr/bin/gradle) and tries to download and install gradle locally but fails with this error:
$ ./gradlew
Downloading https://services.gradle.org/distributions/gradle-3.3-all.zip
........
Unzipping /home/a/.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9/gradle-3.3-all.zip to /home/a/.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9
Set executable permissions for: /home/a/.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9/gradle-3.3/bin/gradle
FAILURE: Build failed with an exception.
Trying gradle manually that's what I get:
$ gradle clean assembleDebug
Starting a Gradle Daemon (subsequent builds will be faster)
Configure project :
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /opt/android-sdk/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'AndroWishApp'.
> Failed to notify project evaluation listener.
> javax/xml/bind/annotation/XmlSchema
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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1m 10s
If you need other info regarding my installation do not hesitate to email me. Thanks.
Due to Google's infinite wisdom, the current AWSDK is stuck at
OpenJDK-8 (maybe 11, too), SDK build tools 25.0.3, SDK tools 25.2.5,
SDK platform 16 rev 5. That is my latest setup on a Debian 9 machine.
To support OpenJDK-13 I will need to update the gradle stuff from
current SDL2 and to introduce incompatible changes to build.gradle
which will break all my other setups nicely.
Thus don't expect an update soon. It will require endless hours of
needless fun to find out how to proper support various setups on
a variety of development systems.
I have installed android-sdk-25.2.5 and removed version 26. As of Java, my Linux distro does not go as backwards as 8. I have ava-11-openjdk and removed openjdk 13. The problem I think is now only with the gradlew script: it can't detect my Java version:
$ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
$ ls $JAVA_HOME |head
bin
conf
demo
include
jmods
legal
lib
man
release
$ ./gradlew --stacktrace --info --debug
13:23:11.296 [INFO] [org.gradle.internal.nativeintegration.services.NativeServices] Initialized native services in: /home/a/.gradle/native
13:23:11.336 [DEBUG] [org.gradle.internal.nativeintegration.services.NativeServices] Unable to load from native-platform backed ConsoleDetector. Continuing with fallback. Failure: net.rubygrapefruit.platform.NativeException: Failed to load native library 'libnative-platform-curses.so' for Linux amd64.
caused by: java.lang.UnsatisfiedLinkError: /home/a/.gradle/native/23/linux-amd64-ncurses6/libnative-platform-curses.so: libncurses.so.6: cannot open shared object file: No such file or directory
13:23:11.375 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
13:23:11.383 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
13:23:11.385 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
13:23:11.387 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
13:23:11.388 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Could not determine java version from '11.0.6'.
13:23:11.413 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
13:23:11.416 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Exception is:
13:23:11.431 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] java.lang.IllegalArgumentException: Could not determine java version from '11.0.6'.
13:23:11.434 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.JavaVersion.toVersion(JavaVersion.java:70)
13:23:11.437 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.JavaVersion.current(JavaVersion.java:80)
13:23:11.440 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.jvm.UnsupportedJavaRuntimeException.assertUsingVersion(UnsupportedJavaRuntimeException.java:29)
13:23:11.443 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:32)
13:23:11.446 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
13:23:11.449 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
13:23:11.454 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
13:23:11.455 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:210)
13:23:11.457 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:174)
13:23:11.458 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:33)
13:23:11.459 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
13:23:11.465 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:23:11.472 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
13:23:11.476 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:23:11.477 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
13:23:11.484 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
13:23:11.486 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
13:23:11.487 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
13:23:11.488 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:23:11.489 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
13:23:11.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:23:11.499 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
13:23:11.511 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
13:23:11.512 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
13:23:11.513 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
13:23:11.514 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
I have also tried with java8 from Sun:
$ echo $JAVA_HOME
/usr/lib/jvm/java-8-jdk/
The gradlew script goes on downloading a lot of stuff, but then fails:
Download https://jcenter.bintray.com/com/android/tools/annotations/25.3.3/annotations-25.3.3.jar
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'AndroWishApp'.
> 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: 2 mins 27.115 secs
Yet my ANDROID_HOME environmental variable looks to be set correctly:
$ echo $ANDROID_HOME
/opt/android-sdk
This is android-sdk-25.2.5 as per suggestion.
Please repeat the JDK 1.8 test with the bones tool from check-in [abc9f9f67a].
At least these developments systems should be able to work:
Debian 9 (stretch) or 10 (buster) with openjdk-8
CentOS 7 (latest minor release) with openjdk-8
The bundled gradle wrapper is definitely not able to support openjdk-11. This
still needs to be fixed but will take some time.
Check-in [a70dfa4800] updates build.gradle and related things in
order to use a newer gradle version which supports openjdk-11
(tested with Debian 10 (buster)). You could check this out by
replacing build.gradle and gradle/wrapper/gradle.properties in
your AndroWish SDK tree.
I tried jdk8 (Oracle Java 8 Development Kit LTS) with android-sdk-25.2.5 and the bones patch you suggested, but I still run into troubles but looks like only for license reasons. That may be related to the fact I had to run everything as root, else my $ANDROID_HOME is not writable. That's what I did:
export JAVA_HOME=/usr/lib/jvm/java-8-jdk/
export ANDROID_HOME=/opt/android-sdk/
./bones
And I get:
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /opt/android-sdk/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
File /root/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 25.0.3 in /opt/android-sdk/licenses
Warning: License for package Android SDK Build-Tools 25.0.3 not accepted.
Checking the license for package Android SDK Platform 16 in /opt/android-sdk/licenses
Warning: License for package Android SDK Platform 16 not accepted.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'AndroWishApp'.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 16, Android SDK Build-Tools 25.0.3].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
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: 13.768 secs
Finally I did an
# sdkmanager "build-tools;25.0.2"
accepted the license and it works now. Thanks for all your support! Up with Tcl/Tk!
Fine. You could go now with openjdk-11 when using the latest build.gradle
as mentioned in my last comments. Maybe this can be used with openjdk-13, too
but I just don't have the time and energy to test all combinations.
Thus I'm closing this ticket for now. Should you encounter further problems,
please add remarks to this ticket and we'll re-open it again.
|