Seshan Ravikumar

aka. Seshpenguin

← Back

title: Android Debugging over USB with Expo (React Native) author: Seshan Ravikumar type: post date: 2019-06-06T13:17:34+00:00 url: /2019/06/06/android-debugging-over-usb-with-expo-react-native/ classic-editor-remember:

Expo is a pretty awesome React Native development framework.

I’ve been working with React Native a lot recently. And so while the straight React Native life is great, compiling your apps with native dependencies (I’M LOOKING AT YOU IOS) can get… annoying. Thankfully Expo makes that easy.

By default though, Expo wants you to debug your apps over the network. This is great, but sometimes your development machine and phone are not on the same network. They do provide a solution for this, the tunnel, but it’s kind of slow since all your debugging traffic has to route through a cloud server.

There is a solution, however! Do it over USB (like the good old days with react-native run-android).

When you launch Expo, it should open the devtools in your browser. When it’s loaded, in the bottom right corner, select **“Local”.**

After that, in the terminal where you started Expo, you should see a message like:

Successfully ran adb reverse. Localhost URLs should work on the connected Android device.

That means Expo was able to see your Android device! If you don’t see that, make sure your device is plugged in and USB Debugging is enabled.

Now all you need to do is press “a” in the terminal. With any luck you should see your app launch on your device! No networking here!