我不知道解决方案是什么,我突然得到了错误的帮助 我,请尝试清理干净,重建无效缓存并重新启动
Error:com.android.builder.merge.DuplicateRelativeFileException: More than one file was found with OS independent path 'META-
INF / androidx.localbroadcastmanager_localbroadcastmanager.version'
这是我的build.grade(应用级别)
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.muhammadtehmoor.guardian_module"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude '**/language/bm/*'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
//noinspection GradleCompatible,GradleCompatible
//implementation 'com.google.firebase:firebase-auth:16.0.6'
//noinspection GradleCompatible
implementation 'com.google.firebase:firebase-database:16.0.6'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
implementation 'com.firebaseui:firebase-ui-database:4.3.1'
//implementation 'com.github.d-max:spots-dialog:1.1@aar'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxjava:2.1.7'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
//implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.github.mancj:MaterialSearchBar:0.8.2'
implementation 'com.karumi:dexter:5.0.0'
implementation 'io.paperdb:paperdb:2.6'
implementation 'me.spark:submitbutton:1.0.1'
implementation 'com.alimuzaffar.lib:animated-edit-text:2.0.2'
implementation 'com.google.firebase:firebase-storage:17.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
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'
configurations {
all*.exclude group: 'androidx.core', module: 'core'
}
}
apply plugin: 'com.google.gms.google-services'
这是我的构建。 gradleproject(级别)我主要包含第3方 依赖
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.0.0'
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
}
maven { url "https://jitpack.io" }
maven {
url 'https://dl.bintray.com/spark/maven'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我尝试了该解决方案,但是没有用
packagingOptions {
exclude 'org/apache/commons/codec/language/bm/*'
} but it doesnot work