Logcat:

12-02 11:14:33.964 28382-28382/? I/art: Not late-enabling -Xcheck:jni (already on) 12-02 11:14:33.964 28382-28382/? W/art: Unexpected CPU variant for X86 using defaults: x86 12-02 11:14:34.048 28382-28382/com.reactnativewebhelloworld D/AndroidRuntime: Shutting down VM --------- beginning of crash 12-02 11:14:34.049 28382-28382/com.reactnativewebhelloworld E/AndroidRuntime: FATAL EXCEPTION: main Process: com.reactnativewebhelloworld, PID: 28382 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.reactnativewebhelloworld/com.reactnativewebhelloworld.MainActivity}: java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 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:6679) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 

Closed due to the fact that the essence of the question is incomprehensible by the participants Anton Shchyrov , user194374, Alex , pavel , Denis Bubnov 5 Dec '16 at 10:34 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

    Must be added to the manifest

     <application android:name=".MainApplication" 
    • Thanks, how did you find the error? It is very interesting to me, because I do not know how this log. - Vaom
    • @Vaom You have java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication in the log java.lang.ClassCastException: android.app.Application cannot be cast to com.facebook.react.ReactApplication , this is a popular problem, for example, after updating react native and the answer is googled along this line. I just found the key line in the log. - lllyct
    • Now this java.lang.RuntimeException: Unable to instantiate application ... java.lang.ClassNotFoundException: Didn't find class "com.reactnativewebhelloworld.ReactNativeWebHelloWorld" on path: DexPathList [[zip file "/ data / app / com. reactnativewebhelloworld-2 / base.apk "]] - Vaom
    • @Vaom little info. It looks like you're using part of the code from here , but there is no ReactNativeWebHelloWorld class. - lllyct
    • Can a full logcat help - Vaom