我在我的应用程序中使用了这两个模块(react-native-video & react-native-nyt-360-video
):
包.json:
...
"dependencies": {
"react": "16.8.3",
"react-native": "0.59.5",
"react-native-nyt-360-video": "1.0.2",
"react-native-video": "^4.4.1"
...
},
应用程序/build.gradle:
...
dependencies {
...
implementation project(':react-native-video')
implementation project(':react-native-nyt-360-video')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
}
我需要将这两个模块放在一起,因为我的应用程序必须同时播放普通视频和 360 视频。
现在,当我运行项目(react-native run-android
)时,我遇到了这个错误:
...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'com.google.android.exoplayer:exoplayer' has different version for the compile (r2.1.0) and runtime (2.9.1) classpath.
You should manually set the same version via DependencyResolution
...
我该做什么?请帮我 。谢谢