Closed Ripplz closed 5 years ago
Hello @Ripplz , sorry to hear about that. Can you please tell me the version of library you are using? and what is parent theme of your app?
I am not sure but this thread might be little helpful. https://github.com/hbb20/CountryCodePickerProject/issues/67#issuecomment-356312398
Hello @Ripplz , sorry to hear about that. Can you please tell me the version of library you are using? and what is parent theme of your app?
I'm using version 2.2.4 of the library, and my app's parent theme is Theme.AppCompat.Light. I'm using an AppCompat theme so I don't think that thread applies.
@hbb20 this same issue has caused crashes on the following additional devices:
Oneplus A5000 running on Android 7.1.1 Samsung SM-G955N running on Android 7.1.2 Samsung SM-G610F running on Android 8.1.0
Oops... Can you post the gradle file?
Oops... Can you post the gradle file?
Which gradle file?
app module gradle file.
build.gradle.zip @hbb20
Just started getting the same error in production. I am using version 2.2.3.
@Ripplz , @kershner thanks for reporting and sorry for the trouble.
I tried to reproduce it with an emulator running on version 4.4.x but could not reproduce.
However, I tried to fix possible issues. But I want your help to check if it is a real fix. 2.2.7.1, 2.2.7.2, 2.2.7.3, 2.2.7.4
are the version I uploaded with different possible fixes. I want you to try these versions where v2.2.7 was causing a crash. Please list which of above 4 worked and which one did not work.
@Ripplz , @kershner, please post here if you will be able to test this. I appreciate your help.
@hbb20 I'm currently using version 2.2.4 of the library, and that's the version on which the error is was produced. As I said, these errors are gotten in production (from crash logs), so it's not something I can even try to reproduce myself as it never occured in any of my test devices and emulators.
What else can be done?
I have also asked for help from other developers who faced this issue. If they are able to reproduce and validate the fix, then we can take their word and go ahead with the fix. Let's wait for their response.
I'm getting crashes (about three so far) from a specific device in production, and it's caused by a ResourcesNotFoundException thrown in CountryCodePicker. The device in question is a Haier ADB61H running on Android 4.4.2.
Here is a stack trace of the crash:
Caused by android.view.InflateException: Binary XML file line #60: Error inflating class com.hbb20.CountryCodePicker at android.view.LayoutInflater.createView(LayoutInflater.java:620) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) at android.view.LayoutInflater.inflate(LayoutInflater.java:492) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at android.view.LayoutInflater.inflate(LayoutInflater.java:353) at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:470) at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:141) at com.talkspaceapp.talkspace.ui.authentication.signin.SignInActivity.onCreate(SignInActivity.java:42) at android.app.Activity.performCreate(Activity.java:5231) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2248) at android.app.ActivityThread.access$800(ActivityThread.java:138) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1199) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5111) at java.lang.reflect.Method.invokeNative(Method.java) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:780) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:596) at dalvik.system.NativeStart.main(NativeStart.java)
Caused by java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.constructNative(Constructor.java) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at android.view.LayoutInflater.createView(LayoutInflater.java:594) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) at android.view.LayoutInflater.inflate(LayoutInflater.java:492) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at android.view.LayoutInflater.inflate(LayoutInflater.java:353) at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:470) at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:141) at com.talkspaceapp.talkspace.ui.authentication.signin.SignInActivity.onCreate(SignInActivity.java:42) at android.app.Activity.performCreate(Activity.java:5231) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2248) at android.app.ActivityThread.access$800(ActivityThread.java:138) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1199) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5111) at java.lang.reflect.Method.invokeNative(Method.java) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:780) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:596) at dalvik.system.NativeStart.main(NativeStart.java)
Caused by android.view.InflateException: Binary XML file line #52: Error inflating class ImageView at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713) at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) at android.view.LayoutInflater.inflate(LayoutInflater.java:492) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at com.hbb20.CountryCodePicker.init(CountryCodePicker.java:185) at com.hbb20.CountryCodePicker.(CountryCodePicker.java:3185) at java.lang.reflect.Constructor.constructNative(Constructor.java) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at android.view.LayoutInflater.createView(LayoutInflater.java:594) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) at android.view.LayoutInflater.inflate(LayoutInflater.java:492) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at android.view.LayoutInflater.inflate(LayoutInflater.java:353) at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:470) at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:141) at com.talkspaceapp.talkspace.ui.authentication.signin.SignInActivity.onCreate(SignInActivity.java:42) at android.app.Activity.performCreate(Activity.java:5231) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2248) at android.app.ActivityThread.access$800(ActivityThread.java:138) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1199) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5111) at java.lang.reflect.Method.invokeNative(Method.java) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:780) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:596) at dalvik.system.NativeStart.main(NativeStart.java)
Caused by android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f080089 a=-1 r=0x7f080089} at android.content.res.Resources.loadDrawable(Resources.java:2068) at android.content.res.TypedArray.getDrawable(TypedArray.java:602) at android.widget.ImageView.(ImageView.java:129) at androidx.appcompat.widget.AppCompatImageView.(AppCompatImageView.java:72) at androidx.appcompat.widget.AppCompatImageView.(AppCompatImageView.java:68) at androidx.appcompat.app.AppCompatViewInflater.createImageView(AppCompatViewInflater.java:187) at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:107) at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1267) at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1317) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684) at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) at android.view.LayoutInflater.inflate(LayoutInflater.java:492) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at com.hbb20.CountryCodePicker.init(CountryCodePicker.java:185) at com.hbb20.CountryCodePicker.(CountryCodePicker.java:3185) at java.lang.reflect.Constructor.constructNative(Constructor.java) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at android.view.LayoutInflater.createView(LayoutInflater.java:594) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) at android.view.LayoutInflater.inflate(LayoutInflater.java:492) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at android.view.LayoutInflater.inflate(LayoutInflater.java:353) at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:470) at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:141) at com.talkspaceapp.talkspace.ui.authentication.signin.SignInActivity.onCreate(SignInActivity.java:42) at android.app.Activity.performCreate(Activity.java:5231) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2248) at android.app.ActivityThread.access$800(ActivityThread.java:138) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1199) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5111) at java.lang.reflect.Method.invokeNative(Method.java) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:780) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:596) at dalvik.system.NativeStart.main(NativeStart.java)