Developing with ExpoKit

Hello, I have to detach my project, because I want to use the third-party native module which need “react-native link”. At first, I create a new project by “expo init eject-test” for test. And did every step mentioned in “Eject to ExpoKit” and “Developing With ExpoKit” documents. I ran and built this test project in Android Studio. Finally, I got a app crash.

This is the screenshot:

This is the error:

10-26 06:34:24.258 6745-6745/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.imagebroad.EjectTest, PID: 6745
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.imagebroad.EjectTest/host.exp.exponent.MainActivity}: java.lang.IllegalArgumentException: unexpected url: http:
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
        at android.app.ActivityThread.-wrap11(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:5417)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
     Caused by: java.lang.IllegalArgumentException: unexpected url: http:
        at expolib_v1.okhttp3.Request$Builder.url(Request.java:142)
        at host.exp.exponent.kernel.ExponentUrls.addExponentHeadersToUrl(ExponentUrls.java:49)
        at host.exp.exponent.ExponentManifest.fetchManifest(ExponentManifest.java:212)
        at host.exp.exponent.ExponentManifest.fetchManifest(ExponentManifest.java:196)
        at host.exp.exponent.AppLoader.fetchRemoteManifest(AppLoader.java:193)
        at host.exp.exponent.AppLoader.startTimerAndFetchRemoteManifest(AppLoader.java:189)
        at host.exp.exponent.AppLoader.startTimerAndFetchRemoteManifest(AppLoader.java:183)
        at host.exp.exponent.AppLoader.access$800(AppLoader.java:20)
        at host.exp.exponent.AppLoader$3.onError(AppLoader.java:160)
        at host.exp.exponent.ExponentManifest.fetchCachedManifest(ExponentManifest.java:284)
        at host.exp.exponent.AppLoader.start(AppLoader.java:91)
        at host.exp.exponent.experience.DetachActivity.onCreate(DetachActivity.java:95)
        at android.app.Activity.performCreate(Activity.java:6237)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
        at android.app.ActivityThread.-wrap11(ActivityThread.java) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:148) 
        at android.app.ActivityThread.main(ActivityThread.java:5417) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Any help please? Thank you.

I found it is the same problem:

Hey @foreseenapp,

Just want to be sure. Does that mean you have resolved the issue on your end and have been able to get back to developing?

Cheers,
Adam

Yes, I resolved it by adding “exp9c9683b1bad1[…]cb088c4d://10.0.0.167:19000” to the variable DEVELOPMENT_URL in Project\android\app\src\main\java\host\exp\exponent\generated\DetachBuildConstants.java.
Thank you.

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.