React Native Android Build: Exception After Ejecting(Detaching) Expo
After so much struggle resolved all the build issues for React Native Android build after ejecting expo but using ExpoKit. Now getting android runtime exception, the app crashes as soon as it is launched. Exception is as follows.
React Native Android Runtime Exception
E/AndroidRuntime(17278): Process: com.company.testapp, PID: 17278 E/AndroidRuntime(17278): java.lang.NoClassDefFoundError: Failed resolution of: Lbolts/AppLinks; E/AndroidRuntime(17278): at com.facebook.appevents.internal.SourceApplicationInfo$Factory.create(SourceApplicationInfo.java:131) E/AndroidRuntime(17278): at com.facebook.appevents.internal.ActivityLifecycleTracker.onActivityCreated(ActivityLifecycleTracker.java:131) E/AndroidRuntime(17278): at com.facebook.appevents.internal.ActivityLifecycleTracker$1.onActivityCreated(ActivityLifecycleTracker.java:77) E/AndroidRuntime(17278): at android.app.Application.dispatchActivityCreated(Application.java:189) E/AndroidRuntime(17278): at android.app.Activity.onCreate(Activity.java:952) E/AndroidRuntime(17278): at android.support.v4.app.SupportActivity.onCreate(SupportActivity.java:66) E/AndroidRuntime(17278): at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:297) E/AndroidRuntime(17278): at host.exp.exponent.experience.ReactNativeActivity.onCreate(ReactNativeActivity.java:130) E/AndroidRuntime(17278): at host.exp.expoview.ExponentActivity.onCreate(ExponentActivity.java:69) E/AndroidRuntime(17278): at android.app.Activity.performCreate(Activity.java:6120) E/AndroidRuntime(17278): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112) E/AndroidRuntime(17278): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2467) E/AndroidRuntime(17278): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2600) E/AndroidRuntime(17278): at android.app.ActivityThread.access$800(ActivityThread.java:177) E/AndroidRuntime(17278): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1469) E/AndroidRuntime(17278): at android.os.Handler.dispatchMessage(Handler.java:111) E/AndroidRuntime(17278): at android.os.Looper.loop(Looper.java:194) E/AndroidRuntime(17278): at android.app.ActivityThread.main(ActivityThread.java:5622) E/AndroidRuntime(17278): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(17278): at java.lang.reflect.Method.invoke(Method.java:372) E/AndroidRuntime(17278): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959) E/AndroidRuntime(17278): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754) E/AndroidRuntime(17278): Caused by: java.lang.ClassNotFoundException: Didn't find class "bolts.AppLinks" on path: DexPathList[[zip file "/data/app/com.company.testapp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.company.testapp-1/lib/arm, /vendor/lib, /system/lib]] E/AndroidRuntime(17278): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) E/AndroidRuntime(17278): at java.lang.ClassLoader.loadClass(ClassLoader.java:511) E/AndroidRuntime(17278): at java.lang.ClassLoader.loadClass(ClassLoader.java:469) E/AndroidRuntime(17278): ... 22 more E/AndroidRuntime(17278): Suppressed: java.lang.ClassNotFoundException: bolts.AppLinks E/AndroidRuntime(17278): at java.lang.Class.classForName(Native Method) E/AndroidRuntime(17278): at java.lang.BootClassLoader.findClass(ClassLoader.java:781) E/AndroidRuntime(17278): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) E/AndroidRuntime(17278): at java.lang.ClassLoader.loadClass(ClassLoader.java:504) E/AndroidRuntime(17278): ... 23 more E/AndroidRuntime(17278): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available V/SettingsInterface( 765): from settings cache , name = dropbox:data_app_crash , value = null V/SettingsInterface( 765): from settings cache , name = send_action_app_error , value = 1 D/ActivityManager( 765): SVC-mBroadcastQueues: com.android.server.am.BroadcastQueue@29a56dae D/ActivityManager( 765): SVC-mBroadcastQueues: com.android.server.am.BroadcastQueue@256ee74f W/ActivityManager( 765): Force finishing activity 1 com.company.testapp/.MainActivity
Solution
Finding the solution… Will update it soon here.