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

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 GitHub by mvysny
, 6 months ago
Failed to resolve attribute at index 24: TypedValue{t=0x3/d=0x5cc "res/color/primary_text_material_light.xml" a=1 r=0x1060157}
via Stack Overflow by Adama Diallo
, 1 year ago
Can t convert to color: type=0x2
via Stack Overflow by Mark
, 3 months ago
Failed to resolve attribute at index 4: TypedValue{t=0x2/d=0x1010099 a=1}
via Stack Overflow by cuoka
, 1 year ago
Failed to resolve attribute at index 24: TypedValue{t=0x3/d=0x2b5 "res/color/secondary_text_material_dark.xml" a=1 r=0x1060166}
java.lang.UnsupportedOperationException: Can't convert to color: type=0x2
at android.content.res.TypedArray.getColor(TypedArray.java:327)
at android.widget.TextView.(TextView.java:1003)
at android.widget.TextView.(TextView.java:908)
at android.widget.TextView.(TextView.java:904)
at com.example.android.shmoti_v4.MainActivities.Movies_Home.onCreate(Movies_Home.java:74)
at android.app.Activity.performCreate(Activity.java:5451)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2377)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2471)
at android.app.ActivityThread.access$900(ActivityThread.java:175)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5602)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
13 more bugmates

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