Not working with Java JDK newer than 8
Looks like steps for starting Android app are not working with Java JDK newer than 8.
I created base app configuration from README (still not sure how to configure Sponsor server) and then went with automatic Android installation step. Prepared environment with https://reactnative.dev/docs/environment-setup.
First running in Android Studio showed me:
Unrecognized VM option 'MaxPermSize=512m'
It's added in https://gitlab.com/evernym/mobile/react-native-white-label-app/-/blob/main/files/android/configure-android.sh#L8
Searching internet showed that it's already not available in Java 9 (and is showing warning in Java 8 that it was removed).
I removed it and started again with another error:
npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1369 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* Where:
Settings file '/home/zybortd/dev/wallet-android/awesomeMsdkProject/android/settings.gradle'
* What went wrong:
Could not compile settings file '/home/zybortd/dev/wallet-android/awesomeMsdkProject/android/settings.gradle'.
> startup failed:
General error during semantic analysis: Unsupported class file major version 63
settings.gradle
file content:
rootProject.name = 'awesomeMsdkProject'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
./gradlew --version
------------------------------------------------------------
Gradle 6.9
------------------------------------------------------------
Build time: 2021-05-07 07:28:53 UTC
Revision: afe2e24ababc7b0213ccffff44970aa18035fc0e
Kotlin: 1.4.20
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 19.0.1 (Private Build 19.0.1+10-Ubuntu-1ubuntu122.04)
OS: Linux 5.15.0-56-generic amd64
Edited by Dobrosław Żybort