Problem when update targetSdkVersion to 30 Dalvik, Javafx,

157 views Asked by At

The problem occurs after changing targetSdkVersion to 30 - the application does not start on Android 11 phones (it works properly on others). If I have targetSdkVersion set to 29, everything works fine on Android 11 phones as well, but I can't update the app in the Play store. The app uses gluon, javafx. I have an error in my logs. Has anyone had a similar problem?

More info:

W/apk: Accessing hidden field Lsun/util/logging/PlatformLogger$Level;->FINER:Lsun/util/logging/PlatformLogger$Level; (blacklist, linking, denied)
    Accessing hidden method Lsun/util/logging/PlatformLogger;->isLoggable(Lsun/util/logging/PlatformLogger$Level;)Z (blacklist, linking, denied)
    Accessing hidden field Lsun/util/logging/PlatformLogger$Level;->WARNING:Lsun/util/logging/PlatformLogger$Level; (blacklist, linking, denied)
    Accessing hidden method Lsun/util/logging/PlatformLogger;->isLoggable(Lsun/util/logging/PlatformLogger$Level;)Z (blacklist, linking, denied)
W/apk: Accessing hidden method Lsun/util/logging/PlatformLogger;->getLogger(Ljava/lang/String;)Lsun/util/logging/PlatformLogger; (blacklist, linking, denied)
I/chatty: uid=10121(unapkz) JavaFX Applicat identical 5 lines
W/apk: Accessing hidden method Lsun/util/logging/PlatformLogger;->getLogger(Ljava/lang/String;)Lsun/util/logging/PlatformLogger; (blacklist, linking, denied)
W/System.err: Exception in Preloader start method
I/System.out: QuantumRenderer: shutdown
W/System.err: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at javafxports.android.DalvikLauncher$1.run(DalvikLauncher.java:188)
        at java.lang.Thread.run(Thread.java:923)
W/System.err: Caused by: java.lang.RuntimeException: Exception in Preloader start method
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:899)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$1(LauncherImpl.java:182)
        at com.sun.javafx.application.LauncherImpl.access$lambda$1(Unknown Source:0)
        at com.sun.javafx.application.LauncherImpl$$Lambda$2.run(Unknown Source:8)
        ... 1 more
W/System.err: Caused by: java.lang.NoSuchMethodError: No static method getLogger(Ljava/lang/String;)Lsun/util/logging/PlatformLogger; in class Lsun/util/logging/PlatformLogger; or its super classes (declaration of 'sun.util.logging.PlatformLogger' appears in /apex/com.android.art/javalib/core-oj.jar)
        at com.sun.javafx.util.Logging.getCSSLogger(Logging.java:98)
        at javafx.scene.CssStyleHelper.<clinit>(CssStyleHelper.java:78)
        at javafx.scene.CssStyleHelper.createStyleHelper(CssStyleHelper.java:92)
        at javafx.scene.Node.reapplyCss(Node.java:8983)
        at javafx.scene.Node.impl_reapplyCSS(Node.java:8946)
        at javafx.scene.Node.invalidatedScenes(Node.java:854)
        at javafx.scene.Node.setScenes(Node.java:919)
W/System.err:     at javafx.scene.Scene$9.invalidated(Scene.java:1119)
        at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:111)
        at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146)
W/System.err:     at javafx.scene.Scene.setRoot(Scene.java:1072)
        at javafx.scene.Scene.<init>(Scene.java:347)
W/System.err:     at javafx.scene.Scene.<init>(Scene.java:223)

My settings:

android {
    compileSdkVersion 31
    buildToolsVersion '30.0.0'


    dexOptions {
        preDexLibraries = false
    }
defaultConfig {
        applicationId "apk"
        minSdkVersion 24
        targetSdkVersion 30
        versionCode 9
        versionName "1.4"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
        }

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'src/main/libs/ext/')
    testImplementation 'junit:junit:4.13'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    implementation('application:apk-1.4-SNAPSHOT') {
        exclude group: 'javax.annotation', module: 'javax.annotation-api'
        exclude group: 'org.glassfish.hk2.external', module: 'javax.inject'
        exclude group: 'com.jfoenix', module: 'jfoenix'
    }
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'javax.activation:activation:1.1.1'
    implementation 'com.google.android.play:core:1.7.3'
    
    testImplementation 'org.javafxports:jfxdvk:8.60.13'
    implementation 'com.android.support:support-compat:28.0.0'
}

As I climbed the built targetSdkVersion 29 package works fine on all devices - but I can't upload this package to the store and the package built for targetSdkVersion 30 does not work on Android 11 phones - error in the attachment above (I have a black screen on my phone, as if the preloader was crashing) .

0

There are 0 answers