java.lang.RuntimeException: Unable to start activity ComponentInfo{com.facebook.react.uiapp/com.facebook.react.uiapp.UIExplorerActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication

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 leeight
, 1 year ago
Unable to start activity ComponentInfo{com.facebook.react.uiapp/com.facebook.react.uiapp.UIExplorerActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication
via GitHub by shuifengYu
, 1 year ago
Unable to start activity ComponentInfo{com.abc360.tool/com.abc360.MyReact2Activity}: java.lang.ClassCastException: com.antfortune.freeline.FreelineApplication cannot be cast to com.facebook.react.ReactApplication
via Stack Overflow by simone_s1994
, 2 years ago
Unable to start activity ComponentInfo{com.simonesessa.count/com.simonesessa.count.MainActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.simonesessa.count.MyApp
via Stack Overflow by userxx
, 2 years ago
Unable to start activity ComponentInfo{com.example.studygroup/com.example.studygroup.MainActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.example.studygroup.MainActivity
via Stack Overflow by sumit
, 1 year ago
Unable to start activity ComponentInfo{com.example.admin.myapplication/com.example.admin.myapplication.MainActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.example.admin.myapplication.ApplicationContext
via GitHub by hiquanta
, 1 year ago
Unable to start activity ComponentInfo{com.hiquanta.logisticsapp/com.hiquanta.logisticsapp.ui.LoginActivity}: java.lang.ClassCastException: android.support.v7.widget.ContentFrameLayout cannot be cast to android.support.v7.widget.ContentFrameLayout
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.facebook.react.uiapp/com.facebook.react.uiapp.UIExplorerActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication
at com.facebook.react.ReactActivity.getReactNativeHost(ReactActivity.java:79)
at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:107)
at com.facebook.react.uiapp.UIExplorerActivity.onCreate(UIExplorerActivity.java:44)
at android.app.Activity.performCreate(Activity.java:6049)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2294)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2403)
at android.app.ActivityThread.access$800(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5298)
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:910)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

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