Could not load exp:// Something went wrong

前端 未结 19 2487
挽巷
挽巷 2021-02-07 06:53

I have created a project using Expo XDE. I checked this Can't load expo app: Something went wrong but I have already enabled \"Draw over other apps\". It works https://expo.

19条回答
  •  囚心锁ツ
    2021-02-07 07:11

    I encountered the same problem and none of the solutions worked for me. The problem here is that Expo shows the wrong IP address which your phone can't connect to.

    This is how I worked around it. I'm going to assume that you're on windows and using LAN to run the app on your device.

    1. Open cmd, type ipconfig and find out your local IP. It should be listed as IPv4 Address under the Wireless LAN Adapter section. It will look something like 192.168.xx.x
    2. Now open any text editor in your phone and type exp://192.168.xx.x:19000. Copy this text to your clipboard.
    3. Open Expo app. You will now see the Open from Clipboard option on the top. Press it and your app should load.

    Now anytime you want to load an app, you can copy the same address and open it in Expo.

    There's another simpler workaround I found. Run the command set REACT_NATIVE_PACKAGER_HOSTNAME=192.168.xx.x before expo start. This will set the correct IP in Expo Dev Tools.

    Hope this helps.

提交回复
热议问题