gpt4 book ai didi

android - react 原生 :app:installDebug FAILED

转载 作者:IT老高 更新时间:2023-10-28 22:06:24 27 4
gpt4 key购买 nike

在我的设备上安装 APK 调试失败。

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

最佳答案

因为你使用的是带有 MIUI 的小米手机

试试这个

进入开发者选项,向下滚动找到“开启 MIUI 优化”并禁用它。您的手机将重新启动

立即查看


如果您使用的任何其他 Android 手机在 Android 操作系统之上具有自定义皮肤/UI,请尝试禁用该 UI 提供的优化并检查。
(通常你可以在“开发者选项”中找到)

关于android - react 原生 :app:installDebug FAILED,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37500205/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com