Open In App

What react-native :app:installDebug FAILED ?

In this article we are going to fix this error i.e. if you are a react native developer then it’s a big possibility that you might come across this error. Let’s understand a solution that works wonders for this error. 

When does this error occur?



This error occurs when we try to run our react-native project on an emulator. For example: with the help of the following command-

npx react-native run-android 

This command starts making the processes work but then it fails when tries to launch the emulator from the android studio. Hence it fails in installing the application.  



Follow the below steps to Fix this error:

Step 1: Launch Android studio and open your project.

Step 2: Go to files and check if Invalidate Caches/Restart… option is active. If it’s not active then click on  Invalidate Caches/Restart… option.

 

 Step 3: Click on Invalidate and Restart.

 

Step 4: Clear the cache of your emulator. To clear the cache click on AVD Manager.

 

Step 5: Click on the down arrow button and click WIPE Data. 

 

That’s all on the android studio side. For most of the users, the problem may not occur after these steps but if the problem is still not resolved then follow the below steps. 

Step 6: Write this command in your project directory:

npx react-native start --port 8084 --reset-cache

What does this command do? Well, it is going to reset the cache of the metro bundler and launches the metro bundler at the same time.

 

Now, We will be running the emulator separately. Open a new cmd(command Prompt) window and write the following command in your project directory.

npx react-native run-android 

Note: Close your all previous emulators if they are currently opened. 

 

Now you can see the build is successful this time. 

Article Tags :