启动就报错!
Closed this issue · 1 comments
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ishiwupai/com.ishiwupai.MainActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2423)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2483)
at android.app.ActivityThread.access$900(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5438)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Caused by: java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication
at com.facebook.react.ReactActivityDelegate.getReactNativeHost(ReactActivityDelegate.java:72)
at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:80)
at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:54)
at android.app.Activity.performCreate(Activity.java:6303)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2376)