Open wojciech-kulik opened 4 years ago
It causes crash on some Android devices.
Do you know the device models/APIs it's crashing on?
I observed it on Pixel 2 (API 26) when running robo test using Firebase Test Lab + it happens on my friend's phone Galaxy S8 (API 28).
In the meantime, I've also tried all combinations of build settings like linking, dex, shrinker etc.
I'm not sure if it's relevant, but the stack trace I attached refers to android.support.v4.view.ViewCompat
, however when I unzip apk
in assemblies
directory there is no v4
assembly, only v7
.
I also tried to disable linker and code shrinking and added android.support.v4
as nuget package it appeared in assemblies
directory, however it did not help either.
I've just created on my machine emulator Pixel 2 (API 26) and it prints out the same stack trace, however, the application starts properly.
Nuget Packages: 4.2.0.848062
@wojciech-kulik Do you still see this error if you update to Forms 4.3.0? 4.3.0 uses a slightly later version of the support packages.
@hartez I tried 4.3.0.991211
but the issue still occurs.
@wojciech-kulik do you have multi dex enabled for release builds?
What is your setup for release builds? MultiDex? ProGuard? D8? R8?
If you're using MultiDexing can you try to just use ProGuard and see if that fixes?
NoClassDefFound
, because there was no other error in logs.Follow up on #8382
@rmarinho why it's closed? This issue still occurs, it doesn't cause crash, but it still occurs.
It still happens but I don't use Forms, so it's probably a general Xamarin issue on top of this Android issue.
Seems pretty harmless and should be fixed in the latest AndroidX versions.
Description
Hi, my Xamarin.Forms application is crashing on some Android devices. I have found some posts about similar issue in native development. The solution is to change in gradle ResolutionStrategy, however I don't know how to apply this fix to Xamarin development.
Here is possible fix: https://stackoverflow.com/questions/53161063/viewcompatonunhandledkeyeventlistener-on-setcontentview
Steps to Reproduce
Just run the application and on some devices it crashes with the following logs:
Packages that I use:
Expected Behavior
Application should work properly on all supported Android devices.
Actual Behavior
It causes crash on some Android devices.
Basic Information