Android App Bundle introduces Resource Not found crash in Android app
This is almost certainly users sharing (sideloading) the app, either via P2P sharing programs, or uploading the APK to the web then other users downloading and installing from the web.
People used to dealing with non Android App Bundle apps just transfer and share the main APK. But your App bundle app has lots of "split APKs" for things like the resources, that is how the size saving happens. You can read all about this process on the help page. If a user installs the main APK without installing the right split APKs, then a "Resources Not found" crash will occur the first time the app tries to load a resource.
If you want to support users sideloading your app and just the main APK you could try to detect this situation and display a message to the user (without using any resources) that says "Please install from Google Play". Or you could just decide you aren't going to support users who share APKs in this way.
I suspect in the long run the websites and P2P sharing programs will get better at sharing such APKs properly, so I wouldn't spend too long worrying about it.
If you see this happening far more frequently on lower Android versions, this isn't probably due to a bug in lower Android versions. Instead, it is probably because in countries where users commonly P2P share apps (eg India) users also are far more likely to be on older version phones.
App sometimes crashes with Resources$NotFoundException after switching to android app bundle distribution
This is almost certainly users sharing the app, either via P2P sharing programs, or uploading the APK to the web then other users downloading and installing from the web.
People used to dealing with non Android App Bundle apps just transfer and share the main APK. But your App bundle app has lots of "split APKs" for things like the resources, that is how the size saving happens. You can read all about this process on the help page. If a user installs the main APK without installing the right split APKs, then a "Resources Not found" crash will occur the first time the app tries to load a resource.
If you want to support users sideloading your app and just the main APK you could try to detect this situation and display a message to the user (without using any resources) that says "Please install from Google Play". Or you could just decide you aren't going to support users who share APKs in this way.
I suspect in the long run the websites and P2P sharing programs will get better at sharing such APKs properly, so I wouldn't spend too long worrying about it.
Android app bundle: What are the chances for resource not resolved exception?
No, it won't throw an exception. The generation of APK is smarter and the xhdpi APK will include the resource with the closest density (following the same logic as the Android platform).
In other words, the xhdpi
split APK doesn't correspond to xhdpi
images only, but correspond to images that would be loaded by the Android platform on an xhdpi
device.
Related Topics
Sending Http Post Request with Android
How to Do an Https Post from Android
Nullpointerexception on Button.Findviewbyid()
Android: Why Setvisibility(View.Gone); or Setvisibility(View.Invisible); Do Not Work
Bitmap Getwidth Returns Wrong Value
Android - Viewrootimpl$Calledfromwrongthreadexception
Java Client and a C++ Server Send and Receive via Tcp Socket
Spark: How to Map Python with Scala or Java User Defined Functions
Reading Properties File in Java
Android Resource Not Found Exception
How to Blur Background Images in Android
Setting Android Images from String Value
Onrequestpermissionsresult Not Being Called in Dialog Fragment
How to Parse or Split Url Address in Java
Why Does My Compare Method Throw Exception -- Comparison Method Violates Its General Contract!