该应用程序在 Android Studio 的模拟器上完美运行,但返回
error Failed to install the app. Make sure you have the Android development environment set up: <a href="https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment" rel="noreferrer noopener nofollow">https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment</a>
当我从 CLI 运行它时
我尝试重新运行命令并创建一个新项目
错误 无法安装应用程序。确保您已设置 Android 开发环境:https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment
最佳答案
请按照以下步骤解决问题:
转到根项目文件夹。
找到 Android 项目(Android Studio 可以识别)
在 Android Studio 上打开它并修复所有与 Gradle 相关的问题。
一旦不再有问题,关闭 Android Studio 并重新运行 react 命令。
关于javascript - React Native 应用程序在模拟器上运行,而不是在设备上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58489125/