面临的问题无法安装该应用程序.确保您拥有Android开发环境“在本地反应 [英] Facing issue " Failed to install the app. Make sure you have the Android development environment " in react native

查看:5811
本文介绍了面临的问题无法安装该应用程序.确保您拥有Android开发环境“在本地反应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请您帮帮我,我很想在react-native中创建一个新项目,如下面的屏幕截图所示.我能够运行旧项目.但我无法运行新项目

Would you please help me, I am stuck to create a new project in react-native Like below screenshot. I have able to run old projects. but I am not able to run a new project

我已按照以下步骤操作:

I have followed these steps:

  1. react-native init projectName
  2. cd projectName
  3. react-native run-projectName
  1. react-native init projectName
  2. cd projectName
  3. react-native run-projectName

但是我得到以下错误:

error Failed to install the app. Make sure you have the Android development environment set up:

推荐答案

要确保为Android正确设置了环境,请转至react-native项目的根目录.在Android Studio IDE中打开android项目(文件夹).

To make sure your environment is setup properly for android, go to the root of your react-native project. Open the android project(folder) in the Android Studio IDE.

与环境有关的所有错误都会显示出来,并且会自动启动Gradle Daemon来为您同步和配置构建.完成后,关闭Android Studio,然后返回命令行并运行:react-native run-android

All errors with your environment will show up, and that will automatically start the Gradle Daemon to sync and configure the build for you. Once it finished, close the Android Studio and come back to command-line and run: react-native run-android

这很好.

这篇关于面临的问题无法安装该应用程序.确保您拥有Android开发环境“在本地反应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆