Error in the React-Native run-android command

Asked

Viewed 790 times

0

Good evening guys, I’m trying to create an app with React-Native, already configured the Android SDK, Node and React-Native-cli. But when I run a React-Native run-android, with an open emulator and everything, it gives the following error:

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

I have tried to re-install several times the SDK, but even to group nothing, you have added the environment variables the ANDROID_HOME with the right path and the %ANDROID_HOME% tools and %ANDROID_HOME% Platform-tools, but still the error persists.

Does anyone know what it could be?

  • Good evening young lady, Rocketseat has a very interesting doc about the development environment with React Native. It is worth checking if something is not missing. https://docs.rocketseat.dev/ambiente-react-native/android/windows

2 answers

0

0

Was JDE installed too? Follow the steps of setting up the rocketseat development environment as already mentioned... But I advise you not to use the React-Native-cli, it was a solution to help script execution along with npm. Considering that npm now has its scripter directly from the repositories, I particularly use it, having npm installed only add npx before the known commands of React-Native-cli. Examples.:

npx react-native run-android

npx react-native start

Browser other questions tagged

You are not signed in. Login or sign up in order to post.