Сборка завершилась неудачно с новым установленным приложением Reaction-native - PullRequest
0 голосов
/ 29 сентября 2019

Я пытаюсь создать приложение, но сталкиваюсь с некоторыми проблемами, поэтому попробовал новые проекты, которые все еще не удалось собрать.Это мои шаги:

1) Установка приложения с

react-native init Myapp

, после чего я запускаю эмулятор в Android Studio и запускаю приложение с:

react-native run-android

и получаю сообщение об ошибке ниже.Я попытался переустановить реактивную систему cli

npm install -g react-native-cli

сбросить кэш в Gradle с помощью

cd android
gradlew cleanBuildCache

Раньше он работал, но так как у меня были некоторые проблемы при сборке apk, янемного повозился с граделом.Я мог обновить что-то, что вызывает ошибку.Любая помощь очень приветствуется!

вот сообщение об ошибке

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve org.webkit:android-jsc:+.
     Required by:
         project :app
      > Failed to list versions for org.webkit:android-jsc.
         > Could not list versions using M2 pattern 'https://jitpack.io/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
            > Could not get resource 'https://jitpack.io/org/webkit/android-jsc/'.
               > Could not GET 'https://jitpack.io/org/webkit/android-jsc/'. Received status code 522 from server: Origin Connection Time-out

* 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 39s

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.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve org.webkit:android-jsc:+.
     Required by:
         project :app
      > Failed to list versions for org.webkit:android-jsc.
         > Could not list versions using M2 pattern 'https://jitpack.io/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
            > Could not get resource 'https://jitpack.io/org/webkit/android-jsc/'.
               > Could not GET 'https://jitpack.io/org/webkit/android-jsc/'. Received status code 522 from server: Origin Connection Time-out

* 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 39s

    at checkExecSyncError (child_process.js:616:11)
    at execFileSync (child_process.js:634:13)
    at runOnAllDevices (D:\Myapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
    at buildAndRun (D:\Myapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
    at then.result (D:\Myapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Ответы [ 2 ]

0 голосов
/ 29 сентября 2019

Я думаю, параметры разработчика закрыты на ваших устройствах. Сначала откройте параметры разработчика,

, а затем попробуйте эту команду

  1. Реактивный собственный init Test
  2. npm i
  3. реактивный родной android или ios.
0 голосов
/ 29 сентября 2019

Установлен ли Android SDK и установлены ли все необходимые переменные?Попробуйте запустить в командной строке:

adb

Если команда не распознана, значит, что-то не так с вашей установкой Android SDK.Для получения подробных инструкций по установке Android SDK перейдите по ссылке , приведенной в сообщении об ошибке .

...