Android Emulator unable to connect to Flipper

5.6k Views Asked by At

I followed the instructions here https://fbflipper.com/docs/getting-started/android-native/#diagnostics. I added the 3 dependencies in build.gradle, and added the application class with the same implementation as in the guide, and linked to it in manifest. However flipper still says "No device found":

enter image description here

I ran the diagnostics command adb shell am start -n <package_name>/com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity and saw that "establish pre-setup connection" and "connect insecurely" failed:

enter image description here

I'm not sure what these errors mean and how to fix them. Would appreciate help!

2

There are 2 best solutions below

0
On

I had the same issue and this worked on my side:

In the flipper application:

  • Open the Settings from the bottom left gear wheel, then "Settings"
  • Change the "Android SDK location" value to the path to the platform tools, something like this: /Users/yourusername/Library/Android/sdk/platform-tools

Flipper configuration

  • Click on "Apply and restart".
0
On

try running :

adb shell am start -n <YOUR_APPLICATION_ID>/com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity

Ref: Follow the steps at: https://fbflipper.com/docs/getting-started/troubleshooting/android/#in-app-diagnostics.

Need to add FlipperDiagnosticActivity to AndroidManifest.xml & ReactNativeFlipper.java are matching. This resolved my issue after making sure app ids of the above are matching.