androidreactjsreact-nativenode-modulesreact-native-router-flux

error after install react-native-router-flux


I created a new bare react-native project and after install react-native-router-flux with react-native install react-native-router-flux and run with react-native run-android I saw this error and project don't run.

enter image description here

my raw error:

FAILURE: Build failed with an exception.

Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not find androidx.transition:transition:1.1.0.
     Searched in the following locations:
       - file:/C:/Users/Sina/.m2/repository/androidx/transition/transition/1.1.0/transition-1.1.0.pom
       - file:/C:/Users/Sina/Desktop/HermesLock3/node_modules/react-native/android/androidx/transition/transition/1.1.0/transition-1.1.0.pom
       - file:/C:/Users/Sina/Desktop/HermesLock3/node_modules/jsc-android/dist/androidx/transition/transition/1.1.0/transition-1.1.0.pom
       - https://dl.google.com/dl/android/maven2/androidx/transition/transition/1.1.0/transition-1.1.0.pom
       - https://jcenter.bintray.com/androidx/transition/transition/1.1.0/transition-1.1.0.pom
       - https://www.jitpack.io/androidx/transition/transition/1.1.0/transition-1.1.0.pom
     Required by:
         project :app > project :react-native-reanimated
Could not find androidx.fragment:fragment:1.2.1.
     Searched in the following locations:
       - file:/C:/Users/Sina/.m2/repository/androidx/fragment/fragment/1.2.1/fragment-1.2.1.pom
       - file:/C:/Users/Sina/Desktop/HermesLock3/node_modules/react-native/android/androidx/fragment/fragment/1.2.1/fragment-1.2.1.pom
       - file:/C:/Users/Sina/Desktop/HermesLock3/node_modules/jsc-android/dist/androidx/fragment/fragment/1.2.1/fragment-1.2.1.pom
       - https://dl.google.com/dl/android/maven2/androidx/fragment/fragment/1.2.1/fragment-1.2.1.pom
       - https://jcenter.bintray.com/androidx/fragment/fragment/1.2.1/fragment-1.2.1.pom
       - https://www.jitpack.io/androidx/fragment/fragment/1.2.1/fragment-1.2.1.pom
     Required by:
         project :app > project :react-native-screens
Could not find androidx.coordinatorlayout:coordinatorlayout:1.1.0.
     Searched in the following locations:
       - file:/C:/Users/Sina/.m2/repository/androidx/coordinatorlayout/coordinatorlayout/1.1.0/coordinatorlayout-1.1.0.pom
       - file:/C:/Users/Sina/Desktop/HermesLock3/node_modules/react-native/android/androidx/coordinatorlayout/coordinatorlayout/1.1.0/coordinatorlayout-1.1.0.pom
       - file:/C:/Users/Sina/Desktop/HermesLock3/node_modules/jsc-android/dist/androidx/coordinatorlayout/coordinatorlayout/1.1.0/coordinatorlayout-1.1.0.pom
       - https://dl.google.com/dl/android/maven2/androidx/coordinatorlayout/coordinatorlayout/1.1.0/coordinatorlayout-1.1.0.pom
       - https://jcenter.bintray.com/androidx/coordinatorlayout/coordinatorlayout/1.1.0/coordinatorlayout-1.1.0.pom
       - https://www.jitpack.io/androidx/coordinatorlayout/coordinatorlayout/1.1.0/coordinatorlayout-1.1.0.pom
     Required by:
         project :app > project :react-native-screens
Could not find com.google.android.material:material:1.1.0.
     Searched in the following locations:
       - file:/C:/Users/Sina/.m2/repository/com/google/android/material/material/1.1.0/material-1.1.0.pom
       - file:/C:/Users/Sina/Desktop/HermesLock3/node_modules/react-native/android/com/google/android/material/material/1.1.0/material-1.1.0.pom
       - file:/C:/Users/Sina/Desktop/HermesLock3/node_modules/jsc-android/dist/com/google/android/material/material/1.1.0/material-1.1.0.pom
       - https://dl.google.com/dl/android/maven2/com/google/android/material/material/1.1.0/material-1.1.0.pom
       - https://jcenter.bintray.com/com/google/android/material/material/1.1.0/material-1.1.0.pom
       - https://www.jitpack.io/com/google/android/material/material/1.1.0/material-1.1.0.pom
     Required by:
         project :app > project :react-native-screens
Could not find androidx.fragment:fragment:1.2.1.
     Searched in the following locations:
       - file:/C:/Users/Sina/.m2/repository/androidx/fragment/fragment/1.2.1/fragment-1.2.1.pom
       - file:/C:/Users/Sina/Desktop/HermesLock3/node_modules/react-native/android/androidx/fragment/fragment/1.2.1/fragment-1.2.1.pom
       - file:/C:/Users/Sina/Desktop/HermesLock3/node_modules/jsc-android/dist/androidx/fragment/fragment/1.2.1/fragment-1.2.1.pom
       - https://dl.google.com/dl/android/maven2/androidx/fragment/fragment/1.2.1/fragment-1.2.1.pom
       - https://jcenter.bintray.com/androidx/fragment/fragment/1.2.1/fragment-1.2.1.pom
       - https://www.jitpack.io/androidx/fragment/fragment/1.2.1/fragment-1.2.1.pom
     Required by:
         project :app > com.facebook.flipper:flipper:0.37.0 > androidx.appcompat:appcompat:1.1.0

BUILD FAILED in 3m 43s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081


Solution

  • If you are from an under sanctions country, it's better to use a proxy and try again.