com.android.ddmlib.InstallException: Failed to establish session react-native

前端 未结 16 1320
情深已故
情深已故 2020-12-12 19:05

I am trying to run react-native android app in my nexus5 emulator

adb devices
List of devices attached
emulator-5554   device

started pack

相关标签:
16条回答
  • 2020-12-12 19:37

    Try : react-native run-android --deviceId YOUR_ID.

    0 讨论(0)
  • 2020-12-12 19:38

    adb is known to be flaky. Try:

    • Restarting adb with $ adb kill-server
    • Restarting the emulator
    • Using Genymotion instead of stock Google emulator.
    0 讨论(0)
  • 2020-12-12 19:40

    Probable Cause

    I faced this issue recently , I had first developed an app called 'myApp' in CordovaJS where the app domain was com.myapp and had it installed (this was months before I got into react ). Then when I switched to react-native I did an app with a domain com.myapp and ran into the same problem you are in.

    So I figured out that there was conflicts when it came to domain and source .

    Solution :

    Uninstall the app that has a similar domain as the one that you are installing eg com.example , then reboot your phone .

    It worked for me , I hope it works for you too.

    0 讨论(0)
  • 2020-12-12 19:41

    If your device or emulator have an application having same name with the application you are building. Just remove the old one. It will resolve the issue.

    0 讨论(0)
  • 2020-12-12 19:42

    For your AVD emulator settings, try to make sure the "Use Host GPU" setting is checked, and relaunch the emulator and try again.

    0 讨论(0)
  • 2020-12-12 19:42

    For those like me having this issue in the emulator, one more tip: try to free up the available storage space in the emulator. That worked for me.

    So many test apps and previous developed apps installed XD

    0 讨论(0)
提交回复
热议问题