Could not connect to React Native development server on Android
In my case the problem was with Android security policies. According to the documentation:
Starting with Android 9.0 (API level 28), cleartext support is disabled by default.
But the application tries to access Metro Bundler through HTTP, right? And that's why it can't. In order to enable cleartext traffic, open your AndroidManifest.xml
and add android:usesCleartextTraffic="true"
to <application>
node.
For example:
<application
android:name="com.example.app"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
You can find more solutions in this SO: https://stackoverflow.com/a/50834600/1673320. OP's problem is different, but similar.
Run this and it worked for me
adb reverse tcp:8081 tcp:8081