我按照ExoPlayer的github指引添加
implementation 'com.google.android.exoplayer:exoplayer:2.X.X'
发现根本run不起来,并报错如题
后来在stackoverflow找到了解决方案,来源为:https://stackoverflow.com/questions/46949622/android-studio-3-0-unable-to-resolve-dependency-for-appdexoptions-compileclas
出现问题的原因在于app含有buildtype但是library的依赖没有,所以我们需要添加一个matching configuration fallbacks
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: Unable to resolve dependency for ':[email protected]/compileClasspath':
原文地址:https://www.cnblogs.com/yuyuan-bb/p/11562054.html
时间: 2024-10-11 00:56:51