CountryCodePicker
CountryCodePicker copied to clipboard
Error in Inflating view in some device
I integrate this library in my app. I t is working fine till now. but yesterday it crash in some user's device . Device list is as below: Xioami Redmi 5A Xioami Redmi 3S YuLong 3600i Samsung Galaxy J2 Pro And Android api version is Android 6.0.1 Android 8.1.0
Issues that is occurs: Caused by android.content.res.Resources$NotFoundException Unable to find resource ID #0x7f070175
android.content.res.Resources.getResourceName (Resources.java:3740)
android.content.res.Resources.loadDrawableForCookie (Resources.java:4246)
android.content.res.Resources.loadDrawable (Resources.java:4153)
android.content.res.Resources.loadDrawable (Resources.java:3998)
android.content.res.TypedArray.getDrawable (TypedArray.java:886)
android.widget.ImageView.
Please help me to solve this issue.
What version of the library did you use? Did you upgrade the version to the current version? If yes, you should update all the related layout too because the package name for the library is changed for the recent version.
Hello thank you for reply. I use 'com.github.joielechong:countrycodepicker:2.3.3' in my app.
and in xml file i use as below: <com.rilixtech.CountryCodePicker xmlns:n2=" http://schemas.android.com/apk/res-auto" android:id="@+id/cc_picker" android:layout_width="wrap_content" android:layout_height="fill_parent" android:gravity="center" n2:ccp_hideNameCode="true" />
On Tue, Sep 24, 2019 at 9:13 AM Joielechong [email protected] wrote:
What version of the library did you use? Did you upgrade the version to the current version? If yes, you should update all the related layout too because the package name for the library is changed for the recent version.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joielechong/CountryCodePicker/issues/66?email_source=notifications&email_token=AMW56S6VFN5AUFVOIQYTZH3QLGEFFA5CNFSM4IYTLMO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7M6XOI#issuecomment-534375353, or mute the thread https://github.com/notifications/unsubscribe-auth/AMW56SZXNQ5HU22BSCW2NMLQLGEFFANCNFSM4IYTLMOQ .
This is seems related with the previous bug at issue #58. The resource layout of the library is being overrided by other layout. Please try using the latest version, 2.4.1.
thanks. I will try using this version. If any error occur than ping you. One more thing I want to tell that in play store I upload my app as bundle means .aab , So is that create issue for this error?
On Tue, Sep 24, 2019 at 3:22 PM Joielechong [email protected] wrote:
This is seems related with the previous bug at issue #58 https://github.com/joielechong/CountryCodePicker/issues/58. The resource layout of the library is being overrided by other layout. Please try using the latest version, 2.4.1.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joielechong/CountryCodePicker/issues/66?email_source=notifications&email_token=AMW56SZ7LWRUAFHY2NTYASLQLHPOLA5CNFSM4IYTLMO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7NZJAI#issuecomment-534484097, or mute the thread https://github.com/notifications/unsubscribe-auth/AMW56S25LNYA6KZQ2ULYJ3DQLHPOLANCNFSM4IYTLMOQ .
yes, same with me, in my case my apk is working fine but while uploading the .aab, it throws android.content.res.Resources$NotFoundException, in some devices
Did you using proguard in your project? What devices show the error?
Please provide the full log so I can investigate this issue asap.
Or, can you provide a minimum sample app to reproduce the problem?
This is list of device in which I fetch that problem: Xioami Redmi 5A Xioami Redmi 3S YuLong 3600i Samsung Galaxy J2 Pro And Android api version is Android 6.0.1 Android 8.1.0
I use Proguard in my project with minifyEnabled true shrinkResources true
My Proguard file is as below:
This is a configuration file for ProGuard.
http://proguard.sourceforge.net/index.html#manual/usage.html
This file is no longer maintained and is not used by new (2.2+) versions
of the
Android plugin for Gradle. Instead, the Android plugin for Gradle
generates the
default rules at build time and stores them in the build directory.
Optimizations: If you don't want to optimize, use the
proguard-android.txt configuration file instead of this one, which
turns off the optimization flags. Adding optimization introduces
certain risks, since for example not all optimizations performed by
ProGuard works on all versions of Dalvik. The following flags turn
off various optimizations known to have issues, but the list may not
be complete or up to date. (The "arithmetic" optimization can be
used if you are only targeting Android 2.0 or later.) Make sure you
test thoroughly if you go this route.
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/,!class/merging/ -optimizationpasses 5 -allowaccessmodification -dontpreverify #-keepattributes Annotation
The remainder of this file is identical to the non-optimized version
of the Proguard configuration file (except that the other file has
flags to turn off optimization).
-dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -verbose
-keepattributes Annotation -keep public class com.google.vending.licensing.ILicensingService -keep public class com.android.vending.licensing.ILicensingService
For native methods, see
http://proguard.sourceforge.net/manual/examples.html#native
-keepclasseswithmembernames class * {
native
keep setters in Views so that animations can still work.
see http://proguard.sourceforge.net/manual/examples.html#beans
-keepclassmembers public class * extends android.view.View { void set*(**); *** get(); }
We want to keep methods in Activity that could be used in the XML
attribute onClick -keepclassmembers class * extends android.app.Activity { public void *(android.view.View); }
For enumeration classes, see
http://proguard.sourceforge.net/manual/examples.html#enumerations -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); }
-keepclassmembers class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator CREATOR; }
-keepclassmembers class *.R$ {
public static
The support library contains references to newer platform versions.
Don't warn about those in case this app is linking against an older
platform version. We know about them, and they are safe.
-dontwarn android.support.**
Understand the @Keep support annotation.
-keep class android.support.annotation.Keep
-keep @android.support.annotation.Keep class * {*;}
-keepclasseswithmembers class * {
@android.support.annotation.Keep
-keepclasseswithmembers class * {
@android.support.annotation.Keep
-keepclasseswithmembers class * {
@android.support.annotation.Keep
On Tue, Oct 22, 2019 at 1:19 PM Joielechong [email protected] wrote:
Did you using proguard in your project? What devices show the error?
Please provide the full log so I can investigate this issue asap.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joielechong/CountryCodePicker/issues/66?email_source=notifications&email_token=AMW56S4K6LXONJSUWK6EFILQP2V7BA5CNFSM4IYTLMO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB42VMA#issuecomment-544844464, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMW56S6HNA5Q2ACOPLDQ5Y3QP2V7BANCNFSM4IYTLMOQ .
Any updates on this issue? I have the same problem here for some devices and it keeps crashing for them.
I integrated with the latest version 'com.github.joielechong:countrycodepicker:2.4.1' but it still crashes.
My Proguard file: -keep class androidx.appcompat.widget.** { ; } -keep class cn.pedant.* { ; } -dontwarn afu.org.checkerframework.* -dontwarn org.checkerframework.** -dontwarn com.google.errorprone.** -dontwarn sun.misc.Unsafe -dontwarn java.lang.ClassValue -dontwarn com.google.android.material.snackbar.**
allow crashlytics to keep annotation and source stack for exceptions
-keepattributes Annotation -keepattributes SourceFile,LineNumberTable -keep public class * extends java.lang.Exception
Any updates? There are still many crashes
I also facing same error. Its working on my devices, but after uploading to playstore it is crashing on some devices. In firebase crashalytics title is like this XposedBridge.java (de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative) inside description it is like this: android.view.InflateException: Binary XML file line #51: Binary XML file line #51: Error inflating class com.rilixtech.widget.countrycodepicker.CountryCodePicker android.app.ActivityThread.performLaunchActivity
Devices facing crash are following: POCO F2 PRO Galaxy A21s ONEPLUS A5000 Galaxy S10 5G HOT5 Mi 9X Pixel 3a vivo S1 Huawei Enjoy 9s Samsung Galaxy A70
The bug is still existing. You can add the Nexus 5X to that list.