Search code examples
androidgoogle-playapkmobile-developmentandroid-app-bundle

Incorrect AAB installation


I'm facing the problem of installing AAB (the app's published on the playmarket) on Nexus 5X

Caused by android.content.res.Resources$NotFoundException: Resource ID #0x7f0800f9
       at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:224)
       at android.content.res.Resources.getValueForDensity(Resources.java:1334)
       at android.graphics.drawable.BitmapDrawable.updateStateFromTypedArray(BitmapDrawable.java:798)
       at android.graphics.drawable.BitmapDrawable.inflate(BitmapDrawable.java:754)

AAB has the following apk files:

  1. base-hdpi.apk
  2. base-ldpi.apk
  3. base-master.apk
  4. base-master_2.apk
  5. base-mdpi.apk
  6. base-tvdpi.apk
  7. base-xhdpi.apk
  8. base-xxhdpi.apk
  9. base-xxxhdpi.apk and other locale apks

I decided to download these apks to the Nexus 5X emulator When I download the bundle of density and master apks (e.g. base-master.apk with base-hdpi.apk), everything works fine, but when I download only the master or master_2 apk, I get the above error

Update: I found the reason of the crash: I had one png image in three drawable packages (drawable, drawable-xxhdpi, drawable-xxxhdpi), when I deleted drawable-xxhdpi, drawable-xxxhdpi and kept only the drawable package the above crash was fixed, but I wanna keep drawable-xxhdpi, drawable-xxxhdpi packages too, 'cause there're different sizes of that image there

I tried to create drawable packages with all densities (xxx-high, xx-high, x-high, high, medium, low, any, no), but it didn't help


Solution

  • Fixed crash by deleting all drawable packages except default one