Запуск приложения ReactNative на Android эмуляторе

Пытаюсь запустить на эмуляторе ReactNative приложение. Сделал вроде бы все по инструкции: https://reactnative.dev/docs/environment-setup , инициализировал проект: npx react-native init AwesomeProject, запустил его: npx react-native start, он запустился (пишет Welcome to React Native!). После чего пытаюсь во втором окне терминала запустить на эмуляторе с помощью команды: npx react-native run-android (до этого запустил Android эмулятор через AVM Menedger), но ругается и выдает ошибку:

error Failed to install the app. Make sure you have an Android emulator running or a device connected. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

И до этого еще пишет:

error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.

Полный код всего:

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 967 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
/bin/sh: adb: command not found
info Launching emulator...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...

> Task :app:stripDebugDebugSymbols UP-TO-DATE
Compatible side by side NDK version was not found.

> Task :app:installDebug
02:55:35 V/ddms: execute: running am get-config
02:55:35 V/ddms: execute 'am get-config' on 'emulator-5554' : EOF hit. Read: -1
02:55:35 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'Nexus_5X_API_29_x86(AVD) - 10' for app:debug
02:55:35 D/app-debug.apk: Uploading app-debug.apk onto device 'emulator-5554'
02:55:35 D/Device: Uploading file onto device 'emulator-5554'
02:55:35 D/ddms: Reading file permision of /Users/nikitaakusev/Documents/ReactNative/MyProjest/android/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r--
02:55:40 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
02:55:49 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read: -1
02:55:49 V/ddms: execute: returning
02:55:49 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
02:55:49 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on 'emulator-5554' : EOF hit. Read: -1
02:55:49 V/ddms: execute: returning
Installed on 1 device.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 18s
27 actionable tasks: 2 executed, 25 up-to-date
info Connecting to the development server...
warn Failed to connect to development server using "adb reverse": spawnSync adb ENOENT
info Starting the app...
error Failed to start the app. Run CLI with --verbose flag for more details.
Error: spawnSync adb ENOENT
    at Object.spawnSync (internal/child_process.js:1070:20)

Ответы (0 шт):