1

我尝试添加exoplayerAndroidX在可能的项目中得到这个错误。

错误

程序类型已存在:android.support.v4.media.MediaBrowserCompat$CustomActionCallback

Message{kind=ERROR, text=Program type already present: android.support.v4.media.MediaBrowserCompat$CustomActionCallback, sources=[Unknown source file], tool name=Optional.of(D8)}

gradle.properties

android.useAndroidX=true
android.enableJetifier=true

构建.gradle

dependencies {
//support library
implementation 'com.google.android.material:material:1.0.0-rc01'
implementation 'androidx.legacy:legacy-support-v4:1.0.0-rc01'
implementation 'androidx.appcompat:appcompat:1.0.0-rc01'
implementation 'androidx.cardview:cardview:1.0.0-rc01'
implementation 'androidx.appcompat:appcompat:1.0.0-rc01'
implementation 'androidx.recyclerview:recyclerview:1.0.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
//android architector componet
implementation "androidx.room:room-runtime:2.0.0-rc01"
kapt "androidx.room:room-compiler:2.0.0-rc01"
implementation "androidx.lifecycle:lifecycle-extensions:2.0.0-rc01"

//exo player
implementation 'com.google.android.exoplayer:exoplayer:2.8.4'
....
}
4

1 回答 1

0

自 ExoPlayer 2.10.* 起“本机”支持 AndroidX(不使用 android.useAndroidX=true 和 android.enableJetifier=true)

于 2019-05-29T15:06:36.397 回答