Could not install the app on the device - React Native Error Solution

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

image
DownloadNp
Last Updated: May 27th 2021

Everytime I try to launch a react native project I got this error:

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.

I can see my virtual device if I run adb devices USB debugging is activated
 

SOLUTION:

You have pointed out two issues; first, make sure you have an android emulator running. To do that, you run 
adb devices 
and you say you can see you device.

The other issue is with the environment. To make sure your environment is setup properly for android, go to the root of your react-native project. Open the android project using android studio.

All errors with your environment will show up, use the automatic fixes provided by android studio. Clean the project in android studio. Close studio and go back to command line, run 
react-native run-android

Everything should work now.

For further errors:
If you still get errors, then goto android directory: 
cd android 
in your project folder then run 
./gradlew clean 
then after that do another 
react-native start 
then 
react-native run-android

Please Login to Comment