uservoice / uservoice-android-sdk

UserVoice Android SDK
https://www.uservoice.com/mobile/
MIT License
117 stars 105 forks source link

Error inflating class TextView #192

Open slawrence opened 9 years ago

slawrence commented 9 years ago

No idea what's going on here. This is when trying to access a feedback suggestion.


07-19 22:35:18.701  15129-15129/com.vrideo.app E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.vrideo.app, PID: 15129
    android.view.InflateException: Binary XML file line #93: Error inflating class TextView
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:770)
            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.uservoice.uservoicesdk.dialog.SuggestionDialogFragment.onCreateDialog(SuggestionDialogFragment.java:56)
            at android.support.v4.app.DialogFragment.getLayoutInflater(DialogFragment.java:308)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:955)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1138)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:740)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1501)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:458)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:145)
            at android.app.ActivityThread.main(ActivityThread.java:5974)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
     Caused by: java.lang.ArrayIndexOutOfBoundsException: length=46; index=1312
            at android.content.res.StringBlock.get(StringBlock.java:65)
            at android.content.res.XmlBlock$Parser.getPooledString(XmlBlock.java:483)
            at android.content.res.TypedArray.loadStringValueAt(TypedArray.java:980)
            at android.content.res.TypedArray.getString(TypedArray.java:178)
            at android.widget.TextView.<init>(TextView.java:1416)
            at android.widget.TextView.<init>(TextView.java:997)
            at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:44)
            at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:40)
            at android.support.v7.internal.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:103)
            at android.support.v7.app.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java:806)
            at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:836)
            at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:732)
            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.uservoice.uservoicesdk.dialog.SuggestionDialogFragment.onCreateDialog(SuggestionDialogFragment.java:56)
            at android.support.v4.app.DialogFragment.getLayoutInflater(DialogFragment.java:308)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:955)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1138)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:740)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1501)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:458)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:145)
            at android.app.ActivityThread.main(ActivityThread.java:5974)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
omkar243 commented 7 years ago

I also encountered this error.

I solved it by simply recreating new .xml file containing TextView. In my case, the error was the xml version(v21\abc.xml). code run well in android version 6(marshmallow) rather than it throws error while run in android version 4.4(kitkat).