Closed landabaso closed 11 months ago
After some more tests I found out it works with a new clean image using "API 33". However, it fails, using "API Tiramisu". The device manager is kind of confusing. Is it safe to assume that the created device "API Tiramisu" is kind of buggy?
That folder is from April 2022. It looks like a beta? drwxr-xr-x 3 xxx xxx 96B Apr 13 2022 android-Tiramisu/
Is it safe to assume that the created device "API Tiramisu" is kind of buggy?
I believe Google uses the codenames for the beta/prerelease software. The stable release versions uses the API number instead.
I scan cordova-android for OnBackInvokedCallback
and it doesn't appear the cordova framework uses it directly. It could be used internally inside an SDK.
I'd also make sure you have the latest revision (revision 2) of the API 33 platform installed.
Yeah, I checked and it was a preview image. I guess that preview did not implement OnBackInvokedCallback
yet while it was being used by a plugin or some part of the code because the system believed it was running a normal API level 33.
I'm closing the issue. Thanks!
I have upgraded from cordova-android@10 to 12. I am encountering a compatibility error after running my Cordova app on an Android API Level 33 emulator (Tiramisu). The app works fine on real devices with older Android versions, but it fails to run on a Tiramisu emulator.
The runtime error message indicates a
java.lang.NoClassDefFoundError
with the messageFailed resolution of: Landroid/window/OnBackInvokedCallback
. This error is caused by ajava.lang.ClassNotFoundException
for the classandroid.window.OnBackInvokedCallback
.OnBackInvokedCallback was introduced in API level 33, and it seems that my project is making use of it after upgrading it to cordova-android@12, resulting in a crash on devices with API level 33. I have investigated the issue and set
android:enableOnBackInvokedCallback="false"
(also to true) in the Android manifest files to disable/enable this feature which did not help.I have spent considerable time trying to identify the specific code that is making the call to OnBackInvokedCallback with no success. I am unsure whether this issue is due to a bug in cordova-android@12 or if there is something else I need to handle differently.
I would like to know if anyone else is facing a similar issue and if it is a known bug in cordova-android@12 or if there are any suggestions on how to properly handle this situation.
EDIT with some more info: I'm running cordova version 12
Also: "cordova-android": "^12.0.0", I already removed all plugins and platforms and installed them from scratch just in case there was an issue in the upgrade process.