任务 ':app:mergeDebugAssets' 执行失败。反应本机

Execution failed for task ':app:mergeDebugAssets'. React Native

当我在我的 React Native 应用程序中安装 react-native-video 时,我的应用程序显示错误。我收到以下错误:

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not find com.yqritc:android-scalablevideoview:1.0.4. Searched in the following locations: - file:/C:/React-Native-Projects/GymBuddyApp/node_modules/react-native/android/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0. 4.pom

有人可以帮助我吗?

在您的 android/build.gradle 文件中尝试按如下方式编辑清理并构建您的项目

allprojects {
    repositories {
        .... # Keep the rest
        jcenter() {
            content {
                includeModule("com.yqritc", "android-scalablevideoview")
            }
        }
    }
}

如果此解决方案不够用,请参考: https://github.com/react-native-video/react-native-video/issues/2468