【问题标题】:Android dependency 'com.google.android.exoplayer:exoplayer' has different version for the compile (r2.1.0) and runtime (2.9.1) classpathAndroid 依赖 'com.google.android.exoplayer:exoplayer' 有不同版本的编译(r2.1.0)和运行时(2.9.1)类路径
【发布时间】:2019-04-30 12:56:07
【问题描述】:

我在我的应用中使用了这两个模块(react-native-video & react-native-nyt-360-video):

package.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"  
    ...
},

app/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

...

我该怎么办?请帮我 。谢谢

【问题讨论】:

    标签: android react-native exoplayer react-native-video


    【解决方案1】:

    运行 > gradlew androidDependencies 命令。使用 control + F 可以查找冲突的子依赖项,从而发现它属于哪个直接依赖项。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-20
      • 2023-03-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多