java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp/com.myapp.MainActivity}: 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

Samebug tips

,

Create an empty public constructor in your code.

Solutions on the web

via GitHub by sarovin
, 1 year ago
Unable to start activity ComponentInfo{com.myapp/com.myapp.MainActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication
via Stack Overflow by Uzair Faisal
, 1 year ago
Unable to start activity ComponentInfo{com.helpr/com.helpr.MainActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication
via Stack Overflow by Dms Malith Disanayake
, 9 months ago
Unable to start activity ComponentInfo{com.example.malith.testcrowd/com.example.malith.testcrowd.NewWorkOrderActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.example.malith.testcrowd.TestCrowd
via GitHub by brdloush
, 7 months ago
Unable to start activity ComponentInfo{net.osmand.plus/net.osmand.plus.activities.MapActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to net.osmand.plus.OsmandApplication
via GitHub by robertsimoes
, 6 months ago
Unable to start activity ComponentInfo{com.pressurelabs.posture/com.pressurelabs.posture.MainActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.pressurelabs.posture.App
via Stack Overflow by Teo Chuen Wei Bryan
, 2 years ago
Unable to start activity ComponentInfo{com.example.testproject/com.example.testproject.Report}: java.lang.ClassCastException: android.app.Application cannot be cast to com.example.testproject.StorageApplication
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp/com.myapp.MainActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)

Users with the same issue

513 times, 1 year ago
1047 times, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 11 months ago
7 times, 1 year ago
9 times, 1 year ago

Write tip

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