0


Here is a bug, reported by Crashlytics with my app.
I have tried almost everything to fix it without luck.
This app use ActionBar with spinner, no exotic stuff.

It seems to happen on Samsung devices with Lollipop and more, and it's not quite frequent
There is the logcat from Samsung device on 5.1.1.

Fatal Exception: android.view.InflateException: Binary XML file line #44: Error inflating class com.android.internal.widget.ActionBarContextView
   at android.view.LayoutInflater.createView(LayoutInflater.java:640)
   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)
   at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)
   at android.view.LayoutInflater.rInflate(LayoutInflater.java:821)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:511)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
   at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:4262)
   at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:4334)
   at com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java:2227)
   at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4089)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3259)
   at android.app.ActivityThread.access$1000(ActivityThread.java:197)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1681)
   at android.os.Handler.dispatchMessage(Handler.java:102)
   at android.os.Looper.loop(Looper.java:145)
   at android.app.ActivityThread.main(ActivityThread.java:6872)
   at java.lang.reflect.Method.invoke(Method.java)
   at java.lang.reflect.Method.invoke(Method.java:372)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Caused by java.lang.reflect.InvocationTargetException
   at java.lang.reflect.Constructor.newInstance(Constructor.java)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
   at android.view.LayoutInflater.createView(LayoutInflater.java:614)
   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)
   at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)
   at android.view.LayoutInflater.rInflate(LayoutInflater.java:821)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:511)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
   at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:4262)
   at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:4334)
   at com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java:2227)
   at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4089)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3259)
   at android.app.ActivityThread.access$1000(ActivityThread.java:197)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1681)
   at android.os.Handler.dispatchMessage(Handler.java:102)
   at android.os.Looper.loop(Looper.java:145)
   at android.app.ActivityThread.main(ActivityThread.java:6872)
   at java.lang.reflect.Method.invoke(Method.java)
   at java.lang.reflect.Method.invoke(Method.java:372)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Caused by java.lang.RuntimeException: Failed to resolve attribute at index 13
   at android.content.res.TypedArray.getDrawable(TypedArray.java:774)
   at android.view.View.(View.java:4009)
   at android.view.ViewGroup.(ViewGroup.java:513)
   at com.android.internal.widget.AbsActionBarView.(AbsActionBarView.java:74)
   at com.android.internal.widget.ActionBarContextView.(ActionBarContextView.java:103)
   at com.android.internal.widget.ActionBarContextView.(ActionBarContextView.java:98)
   at com.android.internal.widget.ActionBarContextView.(ActionBarContextView.java:94)
   at java.lang.reflect.Constructor.newInstance(Constructor.java)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
   at android.view.LayoutInflater.createView(LayoutInflater.java:614)
   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)
   at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)
   at android.view.LayoutInflater.rInflate(LayoutInflater.java:821)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:511)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
   at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
   at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:4262)
   at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:4334)
   at com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java:2227)
   at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4089)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3259)
   at android.app.ActivityThread.access$1000(ActivityThread.java:197)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1681)
   at android.os.Handler.dispatchMessage(Handler.java:102)
   at android.os.Looper.loop(Looper.java:145)
   at android.app.ActivityThread.main(ActivityThread.java:6872)
   at java.lang.reflect.Method.invoke(Method.java)
   at java.lang.reflect.Method.invoke(Method.java:372)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

Thanks for any helpfull ideas !

Irfan
  • 5,070
  • 1
  • 28
  • 32
michgauz
  • 214
  • 2
  • 10
  • Did you try look for `?attr/` attributes in your xml ( http://stackoverflow.com/questions/30595187/android-xml-runtimeexception-failed-to-resolve-attribute-at-index-6 )? Maybe you can post some of the problematic code/xml. – Capricorn Dec 17 '15 at 15:23
  • Yes, already done. The problem is I can't figure out which part is problematic :s – michgauz Dec 17 '15 at 15:56
  • I think this was caused by Samsung Touchwiz animations, which interrupt inflating views. Observe if mistakes would happen again – piotrek1543 Dec 18 '15 at 07:24

0 Answers0