java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.ilija.festivalapp_makedox/com.example.ilija.festivalapp_makedox.CustomSpinner}: java.lang.ClassCastException: android.support.v7.widget.AppCompatSpinner cannot be cast to com.example.ilija.festivalapp_makedox.MySpinner

tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Spinner: AppCompatSpinner cannot be cast to com.example.....MySpinner (Android)

    Stack Overflow | 7 months ago | Ilija Rushkovski
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.ilija.festivalapp_makedox/com.example.ilija.festivalapp_makedox.CustomSpinner}: java.lang.ClassCastException: android.support.v7.widget.AppCompatSpinner cannot be cast to com.example.ilija.festivalapp_makedox.MySpinner

    Root Cause Analysis

    1. java.lang.ClassCastException

      android.support.v7.widget.AppCompatSpinner cannot be cast to com.example.ilija.festivalapp_makedox.MySpinner

      at com.example.ilija.festivalapp_makedox.CustomSpinner.onCreate()
    2. com.example.ilija
      CustomSpinner.onCreate
      1. com.example.ilija.festivalapp_makedox.CustomSpinner.onCreate(CustomSpinner.java:56)
      1 frame
    3. Android Platform
      ActivityThread.performLaunchActivity
      1. android.app.Activity.performCreate(Activity.java:5312)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1111)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2552)
      3 frames