1

I am trying to run react native in an emulator in my AMD based Pc. I get this error saying:

Execution failed for task ':app:installDebug'.

Failed to install on any devices.

I have shown this error in the below image: enter image description here

I am following the official document.

In the official document, click the tab called "Building Projects with Native Code". For Development OS : Windows and Target OS : Android.

Note: Due to my AMD processor I have not installed Intel x86 Emulator Accelerator HAXM, see below image:

enter image description here

So as a work around for AMD processor I have followed this stackoverflow answer, to install ABI called arm64-v80 android 7.0 Nougat when creating a Virtual Device in Android studio. My virtual device is ready and also running now, see below image:

enter image description here

I can correctly start my emulator as shown below image:

enter image description here

MY Installed SDK platforms are:

enter image description here

My SDK tools are show below:

enter image description here

I don't know what is wrong? Please help???

Community
  • 1
  • 1
yogihosting
  • 5,494
  • 8
  • 47
  • 80

3 Answers3

2

It seems that your react-native run-android command is trying to run the app on an API 24 simulator and you started an API 25 one.

Check all the API 24 dependencies and start the API 24 emulator. It should work.

Here is a configuration that works in my case:

enter image description here

enter image description here

Additional notes:

  • From your pictures the emulator is not started yet. Check that simulator is really started yet.

  • Make sure you use Android Studio 3.1.4 and not 3.2.0 if you have RN 0.57.

  • Try to sync gradle and run the project from Android studio, it might work or give you more error info

  • Try to Add the API 24 deps and to start an API 25 simulator (From what I know AVD might require some deps from and older API level.

Florin Dobre
  • 9,872
  • 3
  • 59
  • 93
2

On pc, you should run x86 based emulator.

Geng Jiawen
  • 8,904
  • 3
  • 48
  • 37
1

Try to restart your ADB server. You need to run 2 separate commands:

adb kill-server - to kill the ADB server.

and

adb start-server - to start the server again.

Hope it helps :)

HedeH
  • 2,869
  • 16
  • 25