首页 > 解决方案 > Android Studio - Required for building and installing your app on Android

问题描述

After running the react-native doctor command on the terminal of Visual Studio Code for React Native app it gives ✖ Android Studio - Required for building and installing your app on Android

Android Studio is already installed on Windows 10 and working properly for Android native apps. Can I change the path of Android Studio in React Native setup?

标签: androidreact-native

解决方案


我有同样的问题。我的甚至表明:

    Android
 ✓ JDK
 ✖ Android Studio - Required for building and installing your app on Android
 ✖ Android SDK - Required for building and installing your app on Android   
   - Versions found: N/A
   - Version supported: 29.0.3
 ✓ ANDROID_HOME

Errors:   2
Warnings: 0 
Usage
 › Press f to try to fix issues.
 › Press e to try to fix errors.
 › Press w to try to fix warnings.
 › Press Enter to exit.

在此处输入图像描述

我厌倦了在线上所有不起作用的步骤,只是点击了“e”。它花了一些时间并安装了上述丢失的程序(请注意,我之前已经安装了 Android Studio 和 react-native 文档上的所有 SDK 指令,但由于某种原因它没有被检测到)

当我运行npx react-native doctor时,问题已解决:

在此处输入图像描述

请注意,这可能会消耗一些带宽,因为它正在重新下载 Android Studio 和所有其他依赖项(可能所有内容都应该是大约 2GB 的数据),并且建议使用强大的互联网连接。


推荐阅读