React Native:任务:app:installDebug失败



我正在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.

我试过两次重新安装安卓工作室,也为RN创建了一个新项目,但这对我没有帮助。

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

您需要安装adbExe。请按照此链接中的步骤

最新更新