我使用jcenter导入了exoplayer但是收到的错误是: 错误:(46,13)无法解决:com.google.android.exoplayer:exoplayer:r2.3.0 以下是我的渐变代码:
buildscript{
repositories {
jcenter()
/* mavenCentral()*/
}
dependencies{
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:1.0.0-rc1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}}allprojects {
repositories {
jcenter()
mavenCentral()
}
}
task clean(type: Delete)
{
delete rootProject.buildDir
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.pash.dr"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}}
repositories {
jcenter()
mavenCentral()
}
dependencies
{
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support:design:25.3.0'
compile 'com.android.support:recyclerview-v7:23.3.+'
compile 'com.android.support:cardview-v7:23.3.+'
testCompile 'junit:junit:4.12'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.squareup.picasso:picasso:2.5.2'
/** *************For player ***************/
compile 'com.android.support:support-v4:21.0.3'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
compile 'com.google.android.exoplayer:exoplayer:r2.3.0'
}
请指导我。提前谢谢。
答案 0 :(得分:2)
将外部播放器依赖关系更改为1.5.2,然后转到文件 - >;使缓存无效/重新启动
dependencies
{
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support:design:25.3.0'
compile 'com.android.support:recyclerview-v7:23.3.+'
compile 'com.android.support:cardview-v7:23.3.+'
testCompile 'junit:junit:4.12'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.squareup.picasso:picasso:2.5.2'
/** *************For player ***************/
compile 'com.android.support:support-v4:21.0.3'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
compile 'com.google.android.exoplayer:exoplayer:r1.5.2'
}
答案 1 :(得分:1)
你不必返回版本, 您可以使用上一版本:如此链接[1] https://github.com/google/ExoPlayer/releases 只是尝试无效并重新启动项目