我在尝试构建我的React Native Expo Android项目时遇到问题。
我遇到了无法为android构建的react-native-video问题,该补丁可能会通过以下修补程序解决:https://github.com/expo/expo/issues/2298#issuecomment-483682834
这涉及我从expokit 31升级到32.2.0。我意识到了这一点,因为我遇到了错误:https://github.com/expo/expo/issues/2860 因此,我进行了以下升级:https://docs.expo.io/versions/latest/expokit/expokit/#android-1
一旦到这一点,我就会遇到这种依赖冲突:
Android dependency 'com.google.android.exoplayer:extension-okhttp' has different version for the compile (2.6.1) and runtime (2.9.3) classpath. You should manually set the same version via DependencyResolution
为解决此问题,我将此代码添加到了android.build.gradle:
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.google.android.exoplayer'
&& !details.requested.name.contains('extension-okhttp') ) {
details.useVersion "2.6.1"
}
}
}
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
}
}
}
}
任何人都能让我摆脱这个添加涡流的本机模块吗?