Reputation: 2189
I created my app using react-native-init command. I have installed android studio and Pixel 2 API 28. I can run my android emulator successfully. Then I run react-native run-android in my project directory. However, nothing apears on my android emulator and I got this output in terminal:
info Starting JS server...
info Building and installing the app on the device (cd android && ./gradlew app:installDebug)...
> Task :app:installDebug
01:44:46 V/ddms: execute: running am get-config
01:44:46 V/ddms: execute 'am get-config' on 'emulator-5554' : EOF hit. Read: -1
01:44:46 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'Pixel_2_API_28(AVD) - 9' for app:debug
01:44:46 D/app-debug.apk: Uploading app-debug.apk onto device 'emulator-5554'
01:44:46 D/Device: Uploading file onto device 'emulator-5554'
01:44:46 D/ddms: Reading file permision of /home/kasra/Documents/Linkap/nativeReact/android/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r--
01:44:46 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
01:44:47 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read: -1
01:44:47 V/ddms: execute: returning
01:44:47 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
01:44:47 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read: -1
01:44:47 V/ddms: execute: returning
Installed on 1 device.
BUILD SUCCESSFUL in 1s
26 actionable tasks: 1 executed, 25 up-to-date
/bin/sh: 1: adb: not found
info Starting the app (adb shell am start -n com.nativereact/com.nativereact.MainActivity...
react-native-cli: 2.0.1
react-native: 0.59.5
Android Studio 3.4
Build #AI-183.5429.30.34.5452501, built on April 10, 2019
JRE: 1.8.0_152-release-1343-b16-5323222 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-47-generic
Upvotes: 1
Views: 2054
Reputation: 1664
Have you tried just running react-native start in the terminal and running the emulator? I found that react-native run-and
Upvotes: 2