App is crashing in Android 4.3.1
Caused by android.view.InflateException: Binary XML file line #63: Error inflating class com.hbb20.CountryCodePicker
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:288)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)
at com.pagalguy.prepathon.domainV1.login.SignupUsingPassword.onCreate(SignupUsingPassword.java:73)
at android.app.Activity.performCreate(Activity.java:5252)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1082)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2038)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2099)
at android.app.ActivityThread.access$600(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4954)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:798)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:565)
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:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:587)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:288)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)
at com.pagalguy.prepathon.domainV1.login.SignupUsingPassword.onCreate(SignupUsingPassword.java:73)
at android.app.Activity.performCreate(Activity.java:5252)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1082)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2038)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2099)
at android.app.ActivityThread.access$600(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4954)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:798)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:565)
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:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at com.hbb20.CountryCodePicker.init(CountryCodePicker.java:108)
at com.hbb20.CountryCodePicker.
Thank you for reporting. This crash is unexpected.
Following details will help to find and fix the issue.
- Is this specific to 4.3.1?
- Which version of library are you using?
Try: Probably you have tried it. "sync" helps in such cases.
Kindly reopen the issue with required details if this crash is frequent.
yes , it is frequent , I am using com.hbb20:ccp:1.7.3 , it happens in old devices having 4.3.1 , 4.1.1
I cannot open this issue as owner of repo has closed this issue .
Oops..Can you please update to the latest version of library. Right now it is 2.0.1.
If you still face problem, report crash log (newer) here, I will re-open the issue and solve it.
On Thu, 20 Jul 2017 at 11:58, Ankit [email protected] wrote:
I cannot open this issue as owner of repo has closed this issue .
— You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/hbb20/CountryCodePickerProject/issues/67#issuecomment-316609592, or mute the thread https://github.com/notifications/unsubscribe-auth/AEsN6BUHx2Xl_UHtl42Y01bkWuQxCI1Yks5sPvOggaJpZM4OHqLd .
I am still facing this issue even after updating lib to latest version
Oh, I will re-open the issue.
Can you please post the crash report (for latest library version) and your gradle file to check configuration.
Thanks. On Tue, 8 Aug 2017 at 23:54, Ankit [email protected] wrote:
I am still facing this issue even after updating lib to latest version
— You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/hbb20/CountryCodePickerProject/issues/67#issuecomment-321152450, or mute the thread https://github.com/notifications/unsubscribe-auth/AEsN6M8YExA6vn0fDynDqTrDMN4lYh7Rks5sWTt9gaJpZM4OHqLd .
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.pagalguy.prepathon/com.pagalguy.prepathon.domainV1.login.SignupUsingPassword}: android.view.InflateException: Binary XML file line #63: Error inflating class com.hbb20.CountryCodePicker
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5106)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:532)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by android.view.InflateException: Binary XML file line #63: 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.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at com.pagalguy.prepathon.domainV1.login.SignupUsingPassword.onCreate(SignupUsingPassword.java:87)
at android.app.Activity.performCreate(Activity.java:5133)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5106)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:532)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
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:417)
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.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at com.pagalguy.prepathon.domainV1.login.SignupUsingPassword.onCreate(SignupUsingPassword.java:87)
at android.app.Activity.performCreate(Activity.java:5133)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5106)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:532)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by android.view.InflateException: Binary XML file line #59: 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:147)
at com.hbb20.CountryCodePicker.
it's happening because of Caused by android.content.res.Resources$NotFoundException: File res/drawable/ic_arrow_drop_down_black_24dp.xml from drawable resource ID #0x7f020238
at android.content.res.Resources.loadDrawable(Resources.java:2091)
@ankitPagalGuy, I could not figure out the exact problem here because of different problems in different logs. I also tried to reproduce the problem in physical devices and emulators with the android version you mentioned but could not reproduce it. But tried to fix the probable problem in version 2.0.3.
Please update the library version in your project and then sync and rebuild project. Please comment the result.
I was having the same issue, I had to define the following in my styles to make it work (version 2.0.3)
@dahool, what exactly you did?
If I used CountryCodePicker in my Activity and set the parent theme of Activity to Theme.AppCompat.Light.DarkActionBar, it is no problem. But if I set the parent theme to android:Theme.Holo.Light.DarkActionBar , it crashed by Error inflating class com.hbb20.CountryCodePicker ..... I don't know whether it is related to this issue.
@hbb20 I created the attribute ?android:attr/selectableItemBackground in my styles file
Looks like it crashes when it's unable to find selectable drawables. Which is the case in devices running on lower Android version.
Same problem when used parent theme of Activity to Theme.Holo.Light.DarkActionBar.
java.lang.RuntimeException: Unable to start activity ComponentInfo{ru.cdc.android.optimum/ru.cdc.android.optimum.ui.PhoneVerificationActivity}: android.view.InflateException: Binary XML file line #42: Binary XML file line #42: Error inflating class com.hbb20.CountryCodePicker
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2432)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2492)
at android.app.ActivityThread.access$900(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5458)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)
Caused by: android.view.InflateException: Binary XML file line #42: Binary XML file line #42: Error inflating class com.hbb20.CountryCodePicker
at android.view.LayoutInflater.inflate(LayoutInflater.java:543)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393)
at android.app.Activity.setContentView(Activity.java:2191)
at ru.cdc.android.optimum.ui.PhoneVerificationActivity.onCreate(PhoneVerificationActivity.java:72)
at android.app.Activity.performCreate(Activity.java:6323)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2385)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2492)
at android.app.ActivityThread.access$900(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5458)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)
Caused by: android.view.InflateException: Binary XML file line #42: Error inflating class com.hbb20.CountryCodePicker
at android.view.LayoutInflater.createView(LayoutInflater.java:670)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:789)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:729)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:860)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:823)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:823)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:823)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:823)
at android.view.LayoutInflater.inflate(LayoutInflater.java:519)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393)
at android.app.Activity.setContentView(Activity.java:2191)
at ru.cdc.android.optimum.ui.PhoneVerificationActivity.onCreate(PhoneVerificationActivity.java:72)
at android.app.Activity.performCreate(Activity.java:6323)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2385)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2492)
at android.app.ActivityThread.access$900(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5458)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at android.view.LayoutInflater.createView(LayoutInflater.java:626)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:789)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:729)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:860)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:823)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:823)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:823)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:823)
at android.view.LayoutInflater.inflate(LayoutInflater.java:519)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393)
at android.app.Activity.setContentView(Activity.java:2191)
at ru.cdc.android.optimum.ui.PhoneVerificationActivity.onCreate(PhoneVerificationActivity.java:72)
at android.app.Activity.performCreate(Activity.java:6323)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2385)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2492)
at android.app.ActivityThread.access$900(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5458)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)
Caused by: android.view.InflateException: Binary XML file line #7: Binary XML file line #7: Error inflating class
@hbb20 any ideas?
One possible problem I can think of is, android:background="?attr/selectableItemBackground" in layout_full_width_code_picker.xml and layout_code_picker.xml.
If possible, can you try this and report back the result?
- download both xml files and put them in your
layout/folder by keeping the same name - Remove
android:background="?attr/selectableItemBackgroundfrom both these files - try to run now.
Please post back the result...
@hbb20 download all layout files (4) and removed lines with "?attr". Its work for me, thx
I have applied the possible fix in v2.1.1. Please try this new version and comment if the problem is still there. I will reopen the issue. Thanks.