Manifest merger failed
See original GitHub issueDescribe the bug I received this bug when import the module from gradle.
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.1.0-alpha04] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:14:5-45:19 to override.
It seems this module use AndroidX in developing. Does there is a way to use this module without AndroidX ?
I have read the similar issue #22.
But the solution is not suitable to me.
To Reproduce Steps to reproduce the behavior:
- Add jaiselrahman:FilePicker to project
dependencies {
implementation 'com.github.jaiselrahman:FilePicker:1.2.2'
}
- Try build code to phone
Expected behavior A clear and concise description of what you expected to happen.
Screenshots Here is the merged Manifest.

Here is my project’s build.gradle
file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.30'
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Here is my app’s build.gradle
file
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
android {
compileSdkVersion 28
defaultConfig {
applicationId "......................."
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
buildscript {
ext.supportLibraryVersion = '28.0.0'
ext.butterknifeVersion = '8.8.1'
ext.glideVersion = '4.7.1'
ext.jdeferredVersion = '2.0.0-beta1'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation "com.android.support:appcompat-v7:$supportLibraryVersion"
implementation "com.android.support:support-v4:$supportLibraryVersion"
implementation "com.android.support:design:$supportLibraryVersion"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation "com.jakewharton:butterknife:$butterknifeVersion"
kapt "com.jakewharton:butterknife-compiler:$butterknifeVersion"
implementation 'io.reactivex.rxjava2:rxkotlin:2.2.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'org.immutables:gson:2.7.1'
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'com.github.bumptech.glide:okhttp3-integration:4.9.0'
implementation "com.github.bumptech.glide:glide:$glideVersion"
kapt "com.github.bumptech.glide:compiler:$glideVersion"
implementation 'com.github.jaiselrahman:FilePicker:1.2.2'
implementation "org.jdeferred.v2:jdeferred-core:$jdeferredVersion"
implementation "org.jdeferred.v2:jdeferred-android:$jdeferredVersion"
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'
}
Android info (please complete the following information):
- Device/Emulator Nexus 5X (Android 8.1.0)
- API level 27
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Getting "Manifest merger failed" error after updating to a new ...
Open Manifest File , and add it into Manifest File ... Manifest merger failed : Attribute meta-data#android.support.
Read more >Manifest Merger Fails with Multiple Errors in Android Studio
A merge conflict occurs while merging whenever the value of any attribute is different in the two Manifest files. However, if an element...
Read more >manifest merger failed with multiple errors see logs - Edureka
The initial process would be to open the manifest application known as the AndroidManifest.xml and then click on the Merged Manifest tab below ......
Read more >Manifest merger failed in Unity+Android - Wikitude
Hi, When building an Android APK in Unity (version 2018.3.8f1 Personal) I get the following error: Manifest merger failed : uses-sdk:minSdkVersion 16 cannot...
Read more >Manifest merger failed with multiple errors, see logs.
support.graphics.drawable' used in: AndroidManifest.xml, AndroidManifest.xml. animated-vector-drawable:28.0.0 manifest Error: Apps targeting ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Great!
I found another way to solve the problem by using fork project. 😘 I fork the project and revert the commit 21c0bb975efb3adb955c40ff3f6e1128adc89596
then apply the new gradle dependencies with new jitpack path
Details is in here. https://github.com/j796160836/FilePicker/tree/master_without_androidx
It works like a charm.