安裝APK調試失敗。react-native:app:installDebug失敗
jianglinghuadeMacBook-Pro:hello jianglinghua$ react-native run-android
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug...
WARNING [Project: :app] Current NDK support is deprecated. Alternative will be provided in the future.
:app:preBuild UP-TO-DATE
......
:app:assembleDebug UP-TO-DATE
:app:installDebug
Installing APK 'app-debug.apk' on 'MI NOTE LTE - 6.0.1'
Unable to install /Users/jianglinghua/Desktop/hello/android/app/build/outputs/apk/app-debug.apk
com.android.ddmlib.InstallException: Failed to establish session
at com.android.ddmlib.Device.installPackages(Device.java:894)
........
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
:app:installDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to establish session
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 13.945 secs
無法在設備上安裝應用程序,請閱讀上面的錯誤以瞭解詳細信息。 確保你有一個Android模擬器運行或連接的設備,並有 設置Android開發環境: https://facebook.github.io/react-native/docs/android-setup.html
我看看我的設備
jianglinghuadeMacBook-Pro:hello jianglinghua$ adb devices
List of devices attached
98333978 device
同樣的問題在這裏:/ – roadev
是的,我也有同樣的問題 –
我也是同樣的問題。你有沒有找到任何工作方式的傢伙? – b24