-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed resolution of: Landroidx/activity/OnBackPressedDispatcher$Api34Impl$createOnBackAnimationCallback$1; after updating to 8.0.91 #9428
Comments
Can you attach a logcat file with your crash? |
Unfortunately I am not even able to reproduce the issue. It is only the Play store that is rejecting our app updates because of crash on startup. And I receive the logs in Sentry from the runs they are having during the verification procedure. |
At the moment my best guess is around API versions. The application is targeting API level 34, and it is also set as minimum API level. However the Sentry logs say that the app is being tested on an Android 11 phone, SDK level 30. I have filed a request to let google clarify this. Based on the Api34Impl name, this is probably an OS level version issue. |
When you test locally, are you only testing by running it from VS in the debugger? Have you tried testing locally with the final package you are uploading to Google Play?
If they are able to install it on an Android 11 device then I suspect a minimum level of API-34 has not been set. I believe this is controlled by the You may want to try running your app on an Android 11 emulator and see if you see the same crash. |
@jpobst I see that the supportedOSPlatformVersion was set correctly. This was the line in the csproj at the time of the issue: In the meantime I posted the question to Google as well, how is it that they install the app to OS versions that are not supported. I lowered the version to support Android 11 as well, and danced around a bit in the app, so it does not crash on Android 11. That did the trick for me. By the way, at the time of the issue, the app would not deploy to an Android 11 emulator (as is expected). So from my point of view the issue is not on maui end, but at Google, as they seem to deploy the app to OSes that are not declared supported by the app. Ill come back, if there is any updates from their end. |
I have the same issue, it seems to be mostly during Googles app review only.
Sentry is showing that the device is a OnePlus8Pro, Android 11 |
@rezamohamed if you lower the min supported sdk version to 30, the issue will most likely go away. It did the trick for me. |
Thanks for that workaround. I forget the actual reason now, but I had to set min to 33 (maybe it was Androids new requirement). Ideally, I’d like to figure out the root cause so I can nip it in the bud. Update: found it
|
@rezamohamed This update is about the target API level. The minimum API level can be lower. So you can have API level 34 as target, and 30 as minimum SDK level. |
Hi @skolumban-ex. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Description
I am maintaining a MAUI app, using .Net 8. The MAUI nuget versions are 8.0.91 (I updated from 8.0.71).
The application runs fine on all my devices and on emulator. But it cannot be released on Google Play, as Google refuses it because of broken functionality (the app crashes on startup).
The Sentry logs are showing two issues:
Issue 1:
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/activity/OnBackPressedDispatcher$Api34Impl$createOnBackAnimationCallback$1;
at androidx.activity.OnBackPressedDispatcher$Api34Impl.createOnBackAnimationCallback(OnBackPressedDispatcher.kt:385)
at androidx.activity.OnBackPressedDispatcher.(OnBackPressedDispatcher.kt:127)
at androidx.activity.OnBackPressedDispatcher.(OnBackPressedDispatcher.kt:77)
at androidx.activity.ComponentActivity$onBackPressedDispatcher$2.invoke(ComponentActivity.kt:622)
at androidx.activity.ComponentActivity$onBackPressedDispatcher$2.invoke(ComponentActivity.kt:621)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at androidx.activity.ComponentActivity.getOnBackPressedDispatcher(ComponentActivity.kt:621)
at androidx.fragment.app.FragmentActivity$HostCallbacks.getOnBackPressedDispatcher(FragmentActivity.java:607)
at androidx.fragment.app.FragmentManager.attachController(FragmentManager.java:2919)
at androidx.fragment.app.FragmentController.attachHost(FragmentController.java:117)
at androidx.fragment.app.FragmentActivity.lambda$init$3$androidx-fragment-app-FragmentActivity(FragmentActivity.java:139)
at androidx.fragment.app.FragmentActivity$$ExternalSyntheticLambda3.onContextAvailable
at androidx.activity.contextaware.ContextAwareHelper.dispatchOnContextAvailable(ContextAwareHelper.kt:84)
at androidx.activity.ComponentActivity.onCreate(ComponentActivity.kt:331)
at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:216)
at crc64a98f21486839a9f0.MainActivity.n_onCreate(MainActivity.java)
at crc64a98f21486839a9f0.MainActivity.onCreate(MainActivity.java:51)
at android.app.Activity.performCreate(Activity.java:7994)
at android.app.Activity.performCreate(Activity.java:7978)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1548)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3406)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3607)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2068)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7680)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:423)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
java.lang.ClassNotFoundException: androidx.activity.OnBackPressedDispatcher$Api34Impl$createOnBackAnimationCallback$1
at androidx.activity.OnBackPressedDispatcher$Api34Impl.createOnBackAnimationCallback(OnBackPressedDispatcher.kt:385)
at androidx.activity.OnBackPressedDispatcher.(OnBackPressedDispatcher.kt:127)
at androidx.activity.OnBackPressedDispatcher.(OnBackPressedDispatcher.kt:77)
at androidx.activity.ComponentActivity$onBackPressedDispatcher$2.invoke(ComponentActivity.kt:622)
at androidx.activity.ComponentActivity$onBackPressedDispatcher$2.invoke(ComponentActivity.kt:621)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at androidx.activity.ComponentActivity.getOnBackPressedDispatcher(ComponentActivity.kt:621)
at androidx.fragment.app.FragmentActivity$HostCallbacks.getOnBackPressedDispatcher(FragmentActivity.java:607)
at androidx.fragment.app.FragmentManager.attachController(FragmentManager.java:2919)
at androidx.fragment.app.FragmentController.attachHost(FragmentController.java:117)
at androidx.fragment.app.FragmentActivity.lambda$init$3$androidx-fragment-app-FragmentActivity(FragmentActivity.java:139)
at androidx.fragment.app.FragmentActivity$$ExternalSyntheticLambda3.onContextAvailable
at androidx.activity.contextaware.ContextAwareHelper.dispatchOnContextAvailable(ContextAwareHelper.kt:84)
at androidx.activity.ComponentActivity.onCreate(ComponentActivity.kt:331)
at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:216)
at crc64a98f21486839a9f0.MainActivity.n_onCreate(MainActivity.java)
at crc64a98f21486839a9f0.MainActivity.onCreate(MainActivity.java:51)
at android.app.Activity.performCreate(Activity.java:7994)
at android.app.Activity.performCreate(Activity.java:7978)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1548)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3406)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3607)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2068)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7680)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:423)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Issue 2:
Java.Lang.Error: Failed resolution of: Landroidx/activity/OnBackPressedDispatcher$Api34Impl$createOnBackAnimationCallback$1;
?, in void InstanceMethods.CallNonvirtualVoidMethod(JniObjectReference, JniObjectReference, JniMethodInfo, JniArgumentValue*)
?, in void JniInstanceMethods.InvokeVirtualVoidMethod(string, IJavaPeerable, JniArgumentValue*)
?, in void Activity.OnCreate(Bundle)
?, in void MauiAppCompatActivity.OnCreate(Bundle savedInstanceState)
?, in void MainActivity.OnCreate(Bundle savedInstanceState)
?, in void Activity.n_OnCreate_Landroid_os_Bundle_(IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState)
?, in void JNINativeWrapper.Wrap_JniMarshal_PPL_V(_JniMarshal_PPL_V callback, IntPtr jnienv, IntPtr klazz, IntPtr p0)
Steps to Reproduce
I don't know how to create such an app, ours is rather complicated.
Link to public reproduction project repository
No response
Version with bug
8.0.91 SR9.1
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.71 SR7.1 (on revising history, it might be that no version wint .net 8 would have passed google certification)
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
Nope.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: