Does LG have any Android-Virtual-Device AVD images for their phones - there are crashes which only occurring on LG phones.
LG phones which fail to load png images but rather try and load xml vectorDrawable which has a gradient fill and then crash.

Does LG have any Android-Virtual-Device AVD images for their phones - we have crashes only occurring on LG phones and need to test and resolve the problem. Crashes are reported on LG devices only, here as sample of some of the LG models, all are running 6.0.x

Model: RS988 Build: MMB29M OS: 6.0.1
Model: LGLS991 Build: MRA58K OS: 6.0
Model: LG-H631 Build: MRA58K OS: 6.0
Model: LGLS992 Build: MMB29M OS: 6.0.1

Bug in LG phones - They are loading drawable resources from the drawable-anydpi-v24 directory when the device OS is 6.0 which is API 23. The application should NEVER be loading ANY resources from a directory which has -V24 when the OS is 23.

Our APK has identical resources for the xml vector drawable as PNG in all of the standard density drawable directories.


Crash trace showing loading of wrong drawable "res/drawable-anydpi-v24/currently_selected_location.xml" and cause of crash is trying to process the gradient fill "invalid color state list tag gradient" when it should be loading res/drawable-XXXX/currently_selected_location.xml where XXXX is the density for the device.

Android Studio build chain is smart enough to generate the PNG image from the XML vector drawable because it contains a gradient fill which is only support as of API 24.

android.content.res.Resources$NotFoundException: File res/drawable-anydpi-v24/currently_selected_location.xml from drawable resource ID #0x7f0800b1
at android.content.res.Resources.loadDrawableForCookie(
at android.content.res.Resources.loadDrawable(
at android.content.res.Resources.getDrawable(
at com.wsi.wxlib.utils.BitmapUtils.getBitmapFromVectorDrawable(
at com.wsi.wxlib.utils.BitmapUtils.getMapIconFromDrawable(
at com.mapbox.mapboxsdk.maps.MapView$MapCallback.onMapReady(
at com.mapbox.mapboxsdk.maps.MapView$MapCallback.access$1000(
at com.mapbox.mapboxsdk.maps.MapView$MapCallback$
at android.os.Handler.handleCallback(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invoke(Native Method)
Caused by: android.content.res.Resources$NotFoundException: File res/drawable-anydpi-v24/$currently_selected_location__0.xml from color state list resource ID #0x7f08000c
at android.content.res.Resources.loadColorStateListForCookie(
at android.content.res.Resources.loadColorStateList(
at android.content.res.TypedArray.getColor(
at android.content.res.Resources.loadDrawableForCookie(
... 19 more
Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #14: invalid color state list tag gradient
at android.content.res.ColorStateList.createFromXmlInner(
at android.content.res.ColorStateList.createFromXml(
at android.content.res.Resources.loadColorStateListForCookie(
... 28 more
Attachments: are deleted due to the attachment expiration period of 30 days.)

Posted on 26-Sep-2018