gpt4 book ai didi

android - 无法使用 react-native 找到构建工具修订版 24.0.1

转载 作者:行者123 更新时间:2023-11-29 01:17:27 25 4
gpt4 key购买 nike

我刚刚安装了 React Native 和 Android Studio。我在 ubuntu 14.04 LTS 上,我正在尝试运行

react-native run-android

但是我有这样的错误

Starting JS server...
Running /home/marta/Android/Sdk/platform-tools/adb reverse tcp:8081 tcp:8081
error: no devices/emulators found
Could not run adb reverse: Command failed:/home/marta/Android/Sdk/platform-tools/adb reverse tcp:8081 tcp:8081
Building and installing the app on the device (cd android && ./gradlew installDebug...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> failed to find Build Tools revision 24.0.1

* 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: 6.992 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

我也查过

android list sdk -a

我安装了

Installing Archives:
Preparing to install archives
Downloading Android SDK Platform-tools, revision 24.0.1
Installing Android SDK Platform-tools, revision 24.0.1
Stopping ADB server succeeded.
Installed Android SDK Platform-tools, revision 24.0.199%)
Stopping ADB server succeeded.
Starting ADB server succeeded.
Done. 1 package installed.

这就是我的 build.gradle 文件的样子

http://i.imgur.com/xWGnMTY.png

你知道哪里出了问题吗?

抱歉没有发布照片,但显然我需要 10 个声望。

最佳答案

运行:

android

在您的 sdk/tools 目录中打开 Android 管理器。选择“SDK 构建工具版本 24.0.1”并安装它。您需要使用 Android 管理器而不是 Android Studio 来执行此操作,Android Studio 安装的是 React 无法检测到的版本。

关于android - 无法使用 react-native 找到构建工具修订版 24.0.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38680141/

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