安装 react-native-router-flux 后出错

error after install react-native-router-flux

我创建了一个新的裸反应本机项目 在使用 react-native 安装 react-native-router-flux 和 react-native 运行-android 安装 react-native-router-flux 和 运行 之后,我看到了这个错误和项目't 运行.

我的原始错误:

失败:构建失败,出现异常。

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

3 分钟 43 秒后构建失败

error 应用安装失败。确保您已设置 Android 开发环境:https://reactnative.dev/docs/environment-setup。 运行 带有 --verbose 标志的 CLI 以获取更多详细信息。 Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

如果您来自受制裁国家,最好使用代理再试一次。