InflateException related to hbb20 CountryCodePicker
I tried to debug for long time and the exception is happening for some old version phones.
== Crash phone device examples ==
Device Brand: Trend Model: TaintArt for x86 Orientation: Portrait RAM free: 761.6 MB Disk free: 1.91 GB plat_android Operating System Version: 7.1.2 Orientation: Portrait Rooted: Yes
Device Brand: LGE Model: Nexus 5X Orientation: Portrait RAM free: 1.41 GB Disk free: 542.95 MB plat_android Operating System Version: 8.1.0 Orientation: Portrait Rooted: No
Device Brand: Huawei Model: Huawei Enjoy 9s Orientation: Portrait RAM free: 19.55 GB Disk free: 17.41 GB plat_android Operating System Version: 5.1 Orientation: Portrait Rooted: Yes
== Stack Trace ==
Caused by android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f070069
at android.content.res.Resources.getResourceName(Resources.java:2070)
at android.content.res.Resources.loadDrawableForCookie(Resources.java:2441)
at android.content.res.Resources.loadDrawable(Resources.java:2381)
at android.content.res.TypedArray.getDrawable(TypedArray.java:749)
at android.widget.ImageView.
Anyone could help take a look? It's a long time bug and exception inside the hbb20 lib. Don't know how to solve it.
Thanks for reporting. I know this is critical issue but this is puzzling because it happens on certain devices which I don't have physically and I can not test. I would like some help from developers who can test my potential solution. Do you have any of these devices to reproduce the problem?
On Wed, May 20, 2020 at 17:50 david-young-fax [email protected] wrote:
Anyone could help take a look? It's a long time bug and exception inside the hbb20 lib. Don't know how to solve it.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hbb20/CountryCodePickerProject/issues/403#issuecomment-631796865, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFQ32HUZIL6XADA3DJ5443RSRUEPANCNFSM4NGMV3CQ .
sorry.. I don't have such devices either... Anyone can help??
@hbb20 maybe you can publish the changes into the latest release after normal testing? i can integrate and see if this bug will happen or not? it's still crashing for certain devices...
I just tried with Nexus 5x (one of the devices that you listed) on emulator and could not reproduce the issue.
Are you using Proguard on your production app?
@hbb20 yes, I'm using it to reduce the app file size. does it matter?
Just trying to figure out any clue. I wanna reproduce this somehow so that I can fix. It's surprising that it works on the same emulator. Did you get firebase report for these devices?
what is the parent theme of your app?
@hbb20 yes i found it on the firebase report for these devices.
here is the parent theme definition:
Hello all. I know this is critical issue but it is puzzling because it happens on certain devices which I don't have physically and so I can not test. I would like some help from developers who can confirm the issue on physical device and test my potential solution. Do you have any device that can reproduce the problem with CCP library version 2.3.9?
@hbb20 i removed the lib from proguard rules and it's still crashing. It's small percentage for certain devices, but it's crashing so it has very high risk for these users to give us bad reviews.
This one is the latest device:
Device Brand: LGE Model: Nexus 5X Orientation: Portrait RAM free: 1.35 GB Disk free: 541.63 MB Operating System Version: 8.1.0 Orientation: Portrait Rooted: No
Caused by android.content.res.Resources$NotFoundException Unable to find resource ID #0x7f070069
android.content.res.ResourcesImpl.getResourceName (ResourcesImpl.java:253)
android.content.res.ResourcesImpl.loadDrawableForCookie (ResourcesImpl.java:760)
android.content.res.ResourcesImpl.loadDrawable (ResourcesImpl.java:630)
android.content.res.Resources.loadDrawable (Resources.java:886)
android.content.res.TypedArray.getDrawableForDensity (TypedArray.java:953)
android.content.res.TypedArray.getDrawable (TypedArray.java:928)
android.content.res.XResources$XTypedArray.getDrawable (XResources.java:1363)
android.widget.ImageView.
@hbb20 What could be the problem? Any way to fix? Maybe you can release the fix and let me upgrade and see if the crash will go away?
Great. Let's try this. I published a version with possible fix so please try 2.4.1-alpha1 and let me know.
@david-young-fax did you get chance to test ☝️ alpha version?
@hbb20 we have deployed with the alpha version. However it's still crashing.
Caused by android.content.res.Resources$NotFoundException Unable to find resource ID #0x7f070069
android.content.res.ResourcesImpl.getResourceName (ResourcesImpl.java:253)
android.content.res.ResourcesImpl.loadDrawableForCookie (ResourcesImpl.java:760)
android.content.res.ResourcesImpl.loadDrawable (ResourcesImpl.java:630)
android.content.res.Resources.loadDrawable (Resources.java:886)
android.content.res.TypedArray.getDrawableForDensity (TypedArray.java:953)
android.content.res.TypedArray.getDrawable (TypedArray.java:928)
android.content.res.XResources$XTypedArray.getDrawable (XResources.java:1363)
android.widget.ImageView.
@david-young-fax thank you for trying that out. Can you try another potential solution with
version 2.4.1-alpha2?
@hbb20 yes, we updated with 2.4.1-alpha2 and released again. Unfortunately there are still crashes.
Quite frustrated... what could be the issue?
@hbb20 what could be the issue?
here is another device that crashed:
Device Brand: Trend Model: TaintArt for x86 Orientation: Portrait RAM free: 747.13 MB Disk free: 1.91 GB
Operating System Version: 7.1.2 Orientation: Portrait Rooted: Yes
Yeah. It's frustrating but thank you for trying our different solutions here. Do you have "shrinkResources true" for your app?
I uploaded my demo app with shrinkResources true. And I was expecting to see some issue in pre-launch report but unfortunately I see nothing.. 😞

I too have had this crash in our app. The only user that is having issues is: Samsung J5, version 7.1.1.
Caused by android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f080220
I am also getting the same issue for same device, I too also using proguard, shrink resource and android bundles.
Caused by android.view.InflateException Binary XML file line #108: Binary XML file line #108: Error inflating class com.hbb20.CountryCodePicker
Device Brand: LGE Model: Nexus 5X Orientation: Portrait RAM free: 1.33 GB Disk free: 537.46 MB Operating System Version: 8.1.0 Orientation: Portrait Rooted: No Crash Date: Jun 20, 2020, 10:23:00 PM App version: 3.1.2 (89)
Hi Deepak,
Can I ask for little more help to identify the issue?
- Full crash report
- Is this firebase test lab reporting or user crash?
- Did you get a chance to test it on a physical device (Nexus 5X)?
- Can I get apk and/or download link for your app? I would like to try on emulator of this device.
Thanks, Harsh Bhakta
On Sun, Jun 21, 2020 at 06:05 deepak-patidar-dev [email protected] wrote:
I am also getting the same issue for same device, I too also using proguard, shrink resource and android bundles.
Caused by android.view.InflateException Binary XML file line #108 https://github.com/hbb20/CountryCodePickerProject/issues/108: Binary XML file line #108 https://github.com/hbb20/CountryCodePickerProject/issues/108: Error inflating class com.hbb20.CountryCodePicker
Device Brand: LGE Model: Nexus 5X Orientation: Portrait RAM free: 1.33 GB Disk free: 537.46 MB Operating System Version: 8.1.0 Orientation: Portrait Rooted: No Crash Date: Jun 20, 2020, 10:23:00 PM App version: 3.1.2 (89)
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/hbb20/CountryCodePickerProject/issues/403#issuecomment-647119118, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFQ32DC4YWIJZ7JAZZR74DRXXZPZANCNFSM4NGMV3CQ .
I have 3 users with this crash; Spark Pro (Android 7.0) and L8 Lite (Android 6.0) both are "TECHNO" phones. And Samsun J5 (android 7.1.1.)
@walkerdan5, sorry about that. I am trying to figure out a solution. @david-young-fax has been a great help in trying out different solutions since I can not reproduce it. I have new alpha version 2.4.1-alpha3 with possible fix. Can someone try that an confirm if problem is there or not?
@walkerdan5, sorry about that. I am trying to figure out a solution. @david-young-fax has been a great help in trying out different solutions since I can not reproduce it. I have new alpha version
2.4.1-alpha3with possible fix. Can someone try that an confirm if problem is there or not? Yeah no problem, sorry i can't help much. I have not been able to reproduce it myself. Only affected about 3 out of 40,000 users. So isn't too much of an issue.
I have crash reports on Crashlytics for "TECHNO", "LGE" and "HUAWEI" devices on Android 7/8/9. The crash is same as @david-young-fax The crash happens when ImageView tries rendering @drawable/ccp_down_arrow For some reason, this solution (https://stackoverflow.com/a/44686625/8183406) looks promising. Can someone tell if this should theoretically work?
@firefinchdev please try 2.4.1 (with this potential solution) and let me know if it worked.
@firefinchdev please try
2.4.1(with this potential solution) and let me know if it worked.
2.4.1 fixed it I was having a similar crush on 2.4.0 on x86 emulator API 22 with pixel device profile after updating the error is gone but yet to test further