【问题标题】:React Native: Task :app:installDebug FAILEDReact Native:任务:app:installDebug FAILED
【发布时间】:2020-03-27 06:45:52
【问题描述】:

我正在开发 MAC,试图在 android 上运行 React Native,但它抛出了这个错误:Task :app:installDebug FAILED。这是完整的错误:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
27 actionable tasks: 2 executed, 25 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':app:installDebug'.
> File '/Users/vinaysharma/Library/Android/sdk/platform-tools/adb' specified for property 'adbExe' does not exist.

Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8088

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':app:installDebug'.
> File '/Users/vinaysharma/Library/Android/sdk/platform-tools/adb' specified for property 'adbExe' does not exist.

我尝试过两次重新安装 Android Studio 以及为 RN 创建一个新项目,但这对我没有帮助。

我也尝试过brew cask install android-platform-tools。谢谢。

【问题讨论】:

  • 那之后你有没有运行命令 adb devices
  • @RishiSahu 是的,我做到了。它显示设备列表。
  • 那么 adb 正在工作并安装它是否显示您的设备 ID 或任何数字?
  • 这可能是路径相关的问题,请关注此线程'adbExe' does not exist
  • @RishiSahu 是的,它正在显示设备 ID。

标签: android react-native android-studio gradle daemon


【解决方案1】:

您需要安装 adbExe。请按照this link中的步骤操作

【讨论】:

  • 你好,我在 mac 上工作,但是这个链接是关于 WIN 和 LINUX 的。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-08-04
  • 1970-01-01
  • 1970-01-01
  • 2022-11-12
  • 2021-09-15
  • 2023-03-16
  • 2020-07-30
相关资源
最近更新 更多