1

I´m new in react-native and I´m trying run my first helloworld project. But I´m getting this error How could I solve this?

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 863 file(s) to forward-jetify. Using 4 workers... info Starting JS server... info Installing the app...

FAILURE: Build failed with an exception.

BUILD FAILED in 48s

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.

BUILD FAILED in 48s

at checkExecSyncError (child_process.js:621:11)
at execFileSync (child_process.js:639:15)
at runOnAllDevices (C:\Users\amaro.manungu\AmaroProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (C:\Users\amaro.manungu\AmaroProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\Users\amaro.manungu\AmaroProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Command.handleAction (C:\Users\amaro.manungu\AmaroProject\node_modules\react-native\node_modules\@react-native-community\cli\build\cliEntry.js:160:7)
amaro tati
  • 55
  • 6

2 Answers2

1

Change the following in android/build.gradle

maven { url 'https://jitpack.io' }

to

maven { url 'https://www.jitpack.io' }

Source: https://stackoverflow.com/a/52812651/1889732

YP_be
  • 721
  • 1
  • 7
  • 16
0

build the project with offline mode. you can toggle the offline mode button on in android studio. if you build project use command line add --offline at the end of the gradle command.

leooooooo
  • 400
  • 2
  • 12