java.lang.RuntimeException: Unable to start activity ComponentInfo{com.morais.daniela.doctorquiz/com.morais.daniela.doctorquiz.Activity.ResultActivity}: java.lang.ClassCastException: android.support.v7.internal.widget.TintDrawableWrapper cannot be cast to android.graphics.drawable.LayerDrawable

  1. 0

    Why can't I do cast?

    Stack Overflow | 2 years ago | Daniela Morais
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.morais.daniela.doctorquiz/com.morais.daniela.doctorquiz.Activity.ResultActivity}: java.lang.ClassCastException: android.support.v7.internal.widget.TintDrawableWrapper cannot be cast to android.graphics.drawable.LayerDrawable
  2. 0

    Android LiveWallpaper picker crash

    Stack Overflow | 10 months ago | Ircover
    java.lang.RuntimeException: An error occured while executing doInBackground()
  3. 0

    Inflate exception for Seekbar on Android L

    GitHub | 2 years ago | robisaks
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.snap/com.snap.DragAndDrop}: android.view.InflateException: Binary XML file line #179: Error inflating class com.cengalabs.flatui.views.FlatSeekBar
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 2#131696720

    GitHub | 1 year ago | prabel
    java.lang.ClassCastException: android.graphics.drawable.ColorDrawable cannot be cast to android.support.v7.widget.RoundRectDrawableWithShadow
  6. 0

    The following sample demonstrates that the app crashes when you use both the {{backgroundColor}} and {{cardCornerRadius}} property on a CardView. If you use {{cardBackgroundColor}} instead it works. {code:javascript} var win = Ti.UI.createWindow(); var card = Ti.UI.Android.createCardView({ top: 20, left: 20, right: 20, contentPadding: 20, // Remove and it won't crash cardCornerRadius: 20, // Rename to cardBackgroundColor and it won't crash backgroundColor: '#F00' }); card.add(Ti.UI.createLabel({ text: 'Hello, world!', color: '#000' })); win.add(card); win.open(); {code} *Logs* {code} [ERROR] TiApplication: (main) [478,478] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{test.android/org.appcelerator.titanium.TiActivity}: java.lang.ClassCastException: android.graphics.drawable.ColorDrawable cannot be cast to android.support.v7.widget.RoundRectDrawable; Titanium 5.1.0,2015/10/26 16:46,c914b0f [ERROR] TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{test.android/org.appcelerator.titanium.TiActivity}: java.lang.ClassCastException: android.graphics.drawable.ColorDrawable cannot be cast to android.support.v7.widget.RoundRectDrawable [ERROR] TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325) [ERROR] TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) [ERROR] TiApplication: at android.app.ActivityThread.access$800(ActivityThread.java:151) [ERROR] TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) [ERROR] TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] TiApplication: at android.os.Looper.loop(Looper.java:135) [ERROR] TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5254) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) [ERROR] TiApplication: Caused by: java.lang.ClassCastException: android.graphics.drawable.ColorDrawable cannot be cast to android.support.v7.widget.RoundRectDrawable [ERROR] TiApplication: at android.support.v7.widget.CardViewApi21.setRadius(CardViewApi21.java:36) [ERROR] TiApplication: at android.support.v7.widget.CardView.setRadius(CardView.java:281) [ERROR] TiApplication: at ti.modules.titanium.ui.widget.TiUICardView.processProperties(TiUICardView.java:62) [ERROR] TiApplication: at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1209) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:505) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:496) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:474) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:512) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:496) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:474) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:675) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.jav [ERROR] TiApplication: at ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:237) [ERROR] TiApplication: at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33) [ERROR] TiApplication: at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:501) [ERROR] TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:594) [ERROR] TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18) [ERROR] TiApplication: at android.app.Activity.performCreate(Activity.java:5990) [ERROR] TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) [ERROR] TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) [ERROR] TiApplication: ... 10 more -- End application log ------------------------------------------------------- {code}

    Appcelerator JIRA | 1 year ago | Fokke Zandbergen
    java.lang.RuntimeException: Unable to start activity ComponentInfo{test.android/org.appcelerator.titanium.TiActivity}: java.lang.ClassCastException: android.graphics.drawable.ColorDrawable cannot be cast to android.support.v7.widget.RoundRectDrawable

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      android.support.v7.internal.widget.TintDrawableWrapper cannot be cast to android.graphics.drawable.LayerDrawable

      at com.morais.daniela.doctorquiz.Activity.ResultActivity.setDados()
    2. com.morais.daniela
      ResultActivity.onCreate
      1. com.morais.daniela.doctorquiz.Activity.ResultActivity.setDados(ResultActivity.java:44)
      2. com.morais.daniela.doctorquiz.Activity.ResultActivity.onCreate(ResultActivity.java:36)
      2 frames
    3. Android Platform
      ActivityThread.performLaunchActivity
      1. android.app.Activity.performCreate(Activity.java:4465)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
      3 frames