java.lang.UnsupportedOperationException: Can't convert to color: type=0x2

Hot problem!
This exception has a lot of traffic. You can help 22 users by writing a short tip.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Sergey
, 11 months ago
via Stack Overflow by MAOL
, 5 months ago
via xamarin.com by Unknown author, 2 years ago
via xamarin.com by Unknown author, 2 years ago
via Stack Overflow by Michele Lacorte
, 3 months ago
Failed to resolve attribute at index 1: TypedValue{t=0x2/d=0x7f010093 a=1236}
via GitHub by Arun-Kannan
, 1 year ago
Can't convert to color: type=0x2
java.lang.UnsupportedOperationException: Can't convert to color: type=0x2
at android.support.v7.content.res.AppCompatColorStateListInflater.inflate(AppCompatColorStateListInflater.java:114)
at android.support.v7.content.res.AppCompatColorStateListInflater.createFromXmlInner(AppCompatColorStateListInflater.java:88)
at android.support.v7.content.res.AppCompatColorStateListInflater.createFromXml(AppCompatColorStateListInflater.java:67)
at android.support.v7.content.res.AppCompatResources.inflateColorStateList(AppCompatResources.java:116)
at android.support.v7.content.res.AppCompatResources.getColorStateList(AppCompatResources.java:74)
at android.support.v7.widget.TintTypedArray.getColorStateList(TintTypedArray.java:136)
at android.support.v7.widget.AppCompatTextHelper.onSetTextAppearance(AppCompatTextHelper.java:157)
at android.support.v4.widget.TextViewCompatGingerbread.setTextAppearance(TextViewCompatGingerbread.java:103)
at android.support.v4.widget.TextViewCompat$BaseTextViewCompatImpl.setTextAppearance(TextViewCompat.java:86)
at android.support.design.widget.TextInputLayout.setErrorEnabled(TextInputLayout.java:607)
at android.support.design.widget.TextInputLayout.setError(TextInputLayout.java:693)
at android.support.design.widget.TextInputLayout.setError(TextInputLayout.java:680)
at my.package.databinding.ActivityProductEditBinding.executeBindings(ActivityProductEditBinding.java:394)
at android.databinding.ViewDataBinding.executePendingBindings(ViewDataBinding.java:355)
at my.package.activities.ProductEditActivity$2.prepareToSave(ProductEditActivity.java:62)
at my.package.activities.ProductEditActivity$2.prepareToSave(ProductEditActivity.java:45)
at my.package.listeners.SaveListener.onSave(SaveListener.java:22)
at my.package.databinding.ActivityProductEditBinding._internalCallbackOnClick(ActivityProductEditBinding.java:438)
at android.databinding.generated.callback.OnClickListener.onClick(OnClickListener.java:11)
at android.view.View.performClick(View.java:4204)
at android.view.View$PerformClick.run(View.java:17355)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)

Users with the same issue

Once, 9 months ago
5 times, 9 months ago
Samebug visitor profile picture
Unknown user
Once, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.