当前位置: 首页 > 知识库问答 >
问题:

React-Native:App:InstallDebug失败

阎鸿煊
2023-03-14
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
jianglinghuadeMacBook-Pro:hello jianglinghua$ adb devices
List of devices attached
98333978    device

共有1个答案

屈俊远
2023-03-14

由于您使用的是具有MIUI的Mi phone

试试这个

转到开发人员选项,向下滚动找到“打开MIUI优化”&禁用它。您的电话将重新启动

 类似资料:
  • 在此版本中使用了不推荐使用的Gradle功能,使其与Gradle 6.0不兼容。使用'--warning-mode all‘显示单个弃用警告。参见https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings 26个可操作任务:2个已执行,24个最新 失败:生成失败,出现异常。

  • 错误,无法安装应用程序。确保您已经设置了Android开发环境:https://reactnative.dev/docs/environment-setup。运行带有--verbose标志的CLI以获得更多详细信息。错误:命令失败:./gradlew app:installdebug-preactnativedevserverport=8081 失败:生成失败,出现异常。 在6s中生成失败 MY

  • 创建签名的APK时出错。 任务:react-nate-tcp:验证发布资源失败 失败:构建失败,有一个异常。 > java.util.concurrent.执行异常:com.android.builder.internal.aapt.v2。Android资源链接失败错误:Android资源:样式/文本外观。材料。小部件。按钮。无国界。着色未找到。错误:资源android:样式/文本外观。材料。小部

  • 我正在尝试为Android实现React本机。我确实遵循了github安装说明,但当我尝试使用命令运行时,遇到了编译错误。 任务:React-Native-Maps:CompileDebugrenderScript失败 null > 尝试:使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。使用--scan运行以获得完整的见解。 请访问h

  • 我的项目中出现了以下错误:`Failure:生成失败,出现异常。 > 其中:设置文件'/home/kaizar/music/oreo-fashion-v2.3.0/app/rn_oreo/android/Settings.gradle'行:4 错误:评估设置“rn_oreo”时出现问题。 请访问https://help.gradle.org获取更多帮助

  • 问题内容: 我通过世博会创建了该应用程序。我通过应用程序加载程序上传了ipa,但下面的消息被拒绝了。问题是什么? 该捆绑软件无效-/Payload/ExpoKitApp.app/FacebookSDKStrings.bundle的Info.plist文件丢失或无法读取。 无效的捆绑软件-“ /Payload/ExpoKitApp.app/FacebookSDKStrings.bundle”中的捆绑