我按照ExoPlayer的github指引添加android
implementation 'com.google.android.exoplayer:exoplayer:2.X.X'
发现根本run不起来,并报错如题git
后来在stackoverflow找到了解决方案,来源为:https://stackoverflow.com/questions/46949622/android-studio-3-0-unable-to-resolve-dependency-for-appdexoptions-compileclas
出现问题的缘由在于app含有buildtype可是library的依赖没有,因此咱们须要添加一个matching configuration fallbacks
github
buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } dexOptions { // release & debug is in project animators matchingFallbacks = ['release', 'debug'] } debug { } }
在dexOptions下增长callback便可android-studio