katzer / cordova-plugin-background-mode

Keep app running in background
Apache License 2.0
1.38k stars 1k forks source link

App crashes in Android! #565

Open ChristophSchmid05 opened 2 years ago

ChristophSchmid05 commented 2 years ago

Hi guys I'm facing the following problem. I installed the plugin and as soon as I lock the screen on Android devices, the App crashes and I get the following:

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.catapult.fitup, PID: 10870 java.lang.NoSuchMethodError: No static method metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; in class Ljava/lang/invoke/LambdaMetafactory; or its super classes (declaration of 'java.lang.invoke.LambdaMetafactory' appears in /apex/com.android.runtime/javalib/core-oj.jar) at de.appplant.cordova.plugin.background.BackgroundModeExt.clearKeyguardFlags(BackgroundModeExt.java:387)

I also added compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } to the build.gradle files!

Any ideas?