gpt4 book ai didi

typescript - react-native-video 5.2.0 Android 构建错误 RNC 0.66.3

转载 作者:行者123 更新时间:2023-12-05 01:25:26 29 4
gpt4 key购买 nike

找不到 com.google.android.exoplayer:exoplayer:2.13.2每次我尝试在 android 中构建时都会显示此错误。 IOS 适合我。

我将 jcenter 添加到 android/build.gradle 中,如下所示:

allprojects {
repositories {
.... # rest of your code
jcenter() {
content {
includeModule("com.yqritc", "android-scalablevideoview")
}
}
}
}

但这对我不起作用。

enter image description here

最佳答案

我遇到了同样的错误!但是我没有得到任何完美的解决方案!我使用一个 hacky 解决方案。您可以尝试一下以节省您的时间!

因此,首先您必须阅读文档。添加所有额外的代码后,你必须去

项目根文件夹:node_modules/react-native-video

package.json

"dependencies": {
...
...
"shaka-player": "^3.2.1" // Add this line
},

下一步:转到

/android-exoplayer/build.gradle

dependencies {
...
...
- implementation('com.google.android.exoplayer:exoplayer:2.13.2') { // delete this line
+ implementation('com.google.android.exoplayer:exoplayer:2.13.3') { // add this line
exclude group: 'com.android.support'
}

...
...

- implementation('com.google.android.exoplayer:extension-okhttp:2.13.2') { // delete this line
+ implementation('com.google.android.exoplayer:extension-okhttp:2.13.3') { // add this line
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
}
}

保存它!并再次运行您的项目!

Note: This will not work if you delete your node_modules folder (You have to add it again for working properly)I think this solution will be added in the next release ofreact-native-video

希望你一切顺利!

关于typescript - react-native-video 5.2.0 Android 构建错误 RNC 0.66.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70829457/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com