Reputation: 2836
Following this React Native Tutorial: Building Android Apps with JavaScript tutorial. I have the Android Studio open and the emulator running and it´s working I tested with another Android Studio app.
I read in the output below - Building and installing the app on the device and also - Starting the app
But the emulator does not show the app, any ideas? CMD OUTPUT:
L:\react\PropertyFinder\PropertyFinder>react-native run-android JS server already running. Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Task :app:installDebug Installing APK 'app-debug.apk' on 'Nexus_5X_API_27_Android_8.1_ORIO(AVD) - 8.1.0' for app:debug Installed on 1 device.
BUILD SUCCESSFUL in 8s 27 actionable tasks: 1 executed, 26 up-to-date 'adb' is not recognized as an internal or external command, operable program or batch file. Starting the app (adb shell am start -n com.propertyfinder/com.propertyfinder.MainActivity...
L:\react\PropertyFinder\PropertyFinder>
Upvotes: 1
Views: 17090
Reputation: 706
You can use the npx react-native run-android --list-devices
command to list available emulators, and if you have a real device connected, it will show you there.
Upvotes: 0
Reputation: 852
You can uninstall the APP from your emulator from settings -> Apps -> Select your app and uninstall
Then follow this
Upvotes: 13
Reputation: 587
The error says you dont have adb
installed on your device.
You need to install the adb commands, and make sure they're globally available in your $PATH
. Here are a few step by step tutorials for it:
https://www.xda-developers.com/install-adb-windows-macos-linux/
https://www.xda-developers.com/adb-fastboot-any-directory-windows-linux/
Once you have adb installed, Open your terminal and type
adb version
to make sure its installed correctly. If you run the command react-native run-android
again, after removing the app from the device, it should link it to the packager and would work fine.
The problem is Android studio has all the tools, but it only creates an environment inside the Android Studio, and none of the tools are available outside the Android Studio env.
Upvotes: 1
Reputation: 2836
Answering my self, I run this yesterday so the app was already installed on the emulator.
The cmd command :
react-native run-android
did not start the app since it´s installed for some reason, I hade to manually start the app on the emulator and then I could continue the tutorial
Upvotes: 1