Не могу запустить приложение RN на реальном android устройстве. MacOS - PullRequest
0 голосов
/ 05 апреля 2020

Я пытаюсь проверить реакцию собственного приложения на мобильном устройстве, но у меня возникает ошибка после запуска npx react-native run-android.

Вот ошибка.

"Install Android SDK Build-Tools 28.0.3 (revision: 28.0.3)" finished.
Checking the license for package Android SDK Platform 28 in /Users/admin/Library/Android/sdk/licenses
License for package Android SDK Platform 28 accepted.
Preparing "Install Android SDK Platform 28 (revision: 6)".
"Install Android SDK Platform 28 (revision: 6)" ready.
Installing Android SDK Platform 28 in /Users/admin/Library/Android/sdk/platforms/android-28
"Install Android SDK Platform 28 (revision: 6)" complete.
"Install Android SDK Platform 28 (revision: 6)" finished.

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

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to find target with hash string 'android-28' in: /Users/admin/Library/Android/sdk

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 35s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to find target with hash string 'android-28' in: /Users/admin/Library/Android/sdk

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 35s

    at checkExecSyncError (child_process.js:611:11)
    at execFileSync (child_process.js:629:15)
    at runOnAllDevices (/Users/admin/Desktop/BST/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:39)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Я загрузил SDK и поместил в / Пользователи / Администратор / Библиотека / Android / SDK. $ ANDROID_HOME показывает то же местоположение ...

Я включил отладку по USB через телефон и т. Д. c ..

любая помощь?

...