Closed Bhoomishah1990 closed 5 years ago
Have you referred to the developer documentation and sample usage in demo application? https://exoplayer.dev/downloading-media.html
i have applied but i am using exoplayer version 2.10.3
but got error org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures. Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugManifest'.
Caused by: java.lang.RuntimeException: Manifest merger failed with multiple errors, see logs at com.android.builder.core.AndroidBuilder.mergeManifestsForApplication(AndroidBuilder.java:558) at com.android.build.gradle.tasks.ProcessApplicationManifest.doFullTaskAction(ProcessApplicationManifest.java:208)
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.test"
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
def supportVersion = "28.0.0"
def glideVersion = "4.9.0"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.android.support:appcompat-v7:$supportVersion"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
// Recyclerview
implementation "com.android.support:recyclerview-v7:$supportVersion"
// ExoPlayer
implementation 'com.google.android.exoplayer:exoplayer:2.10.3' // 2.9.0 has min sdk 26
implementation "com.github.bumptech.glide:glide:$glideVersion"
annotationProcessor "com.github.bumptech.glide:compiler:$glideVersion"
}
i have added gradle.properties:=
android.useAndroidX=true android.enableJetifier=true
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
let me know anything is missing
You are using Support libraries (com.android.support.*), while Exoplayer has migrated to Jetpack/AndroidX. Application having dependency on both Support Library and Jetpack / AndroidX can give the type of build errors you are facing.
You may either migrate your application to Jetpack, OR use an older Exoplayer version (before #5489)
i have implemented androidx.
dependencies {
def glideVersion = "4.9.0"
implementation "androidx.appcompat:appcompat:1.0.2"
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
// Recyclerview
implementation "androidx.recyclerview:recyclerview:1.0.0"
// ExoPlayer
implementation 'com.google.android.exoplayer:exoplayer:2.10.3' // 2.9.0 has min sdk 26
implementation "com.github.bumptech.glide:glide:$glideVersion"
annotationProcessor "com.github.bumptech.glide:compiler:$glideVersion"
}
still same error
Please check detailed build logs, they may give information on root cause for this build error. Running gradle in from command line may also help (gradlew assemble --info --full-stacktrace).
I am not sure why "Manifest merger failed" error is thrown in this case.
remove android:tools:appComponentFactory then it is done.
Thankx for support
i am trying to add Downloading media inside recycle view, can you please send me guide for that.