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

前端 未结 16 1319
情深已故
情深已故 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:20

    step :1 run(kill all adb)

     adb kill-server
    

    step 2:list all connected devices(get your emulator id)

    adb devices 
    

    step 3:(replace ID to listed id from step2)

    react-native run-android --deviceId ID
    

    Note: make sure your previous app uninstalled in your emulator or physical device

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

    For Mi devices

    for those who suffer from this, try what lironess mentions in a Github Comment

    1. enable developer mode - In your phone, go to Settings, About phone and click on MIUI version 7 times. You’ll see a pop up which says you are a developer now.
    2. Go back to Settings, Additional settings, Developer options and enable USB Debugging.
    3. Connect your phone to your PC/Mac and on the phone authorize your computer
    4. go back to Developer options, scroll down to find Turn on MIUI optimization and disable it. Your phone will be rebooted
    5. Try it now :)
    0 讨论(0)
  • 2020-12-12 19:25
    Sometimes it may happened due to insufficient storage within emulator.Try something like below:
       1. Stop emulator
       2. Open AVD Manager -> Wipe Data
       3. Start emulator and run your project.
    
    0 讨论(0)
  • 2020-12-12 19:30

    01 - Uninstall the app installed in device

    03- then run

    • adb kill-server

    02 -Then run again

    • react-native run-android
    0 讨论(0)
  • 2020-12-12 19:31

    In my case, I have to run this command in
    /sdklocation/platform-tools/

     adb kill-server
    

    then run again and watch for install request on the phone.
    hope this help some one

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

    Even i had the same problem,but restarting the genymotion and running the "react-native run-android" again worked for me. Ensure genymotion is running before running the above command.

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