gpt4 book ai didi

android - Gradle 错误 : More than one file was found with OS independent path 'META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version'

转载 作者:行者123 更新时间:2023-11-29 14:43:09 27 4
gpt4 key购买 nike

我的 Android 应用程序需要 android-image-cropper 库,所以我将它添加到 gradle 依赖项中。同步后,出现了一些错误。

这是一个,gradle 无法修复:

More than one file was found with OS independent path 'META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version'

我的应用程序中的 build.gradle 是:

apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "asif.com.firebasedemo.activity"
minSdkVersion 18
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
debug {

resValue 'string', "FACEBOOK_APP_ID", FirebaseAuthenticationSample_FACEBOOK_APP_ID
resValue 'string', "FB_LOGIN_PROTOCOL_SCHEME", FirebaseAuthenticationSample_FB_LOGIN_PROTOCOL_SCHEME
buildConfigField 'String', "DEFAULT_WEB_CLIENT_ID", FirebaseAuthenticationSample_DEFAULT_WEB_CLIENT_ID

}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

resValue 'string', "FACEBOOK_APP_ID", FirebaseAuthenticationSample_FACEBOOK_APP_ID
resValue 'string', "FB_LOGIN_PROTOCOL_SCHEME", FirebaseAuthenticationSample_FB_LOGIN_PROTOCOL_SCHEME
buildConfigField 'String', "DEFAULT_WEB_CLIENT_ID", FirebaseAuthenticationSample_DEFAULT_WEB_CLIENT_ID
}
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.1'

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'

//firebase libraries

// compile 'com.google.firebase:firebase-messaging:17.3.4' //firebase cloud messaging

implementation 'com.google.firebase:firebase-auth:16.0.4'
implementation 'com.google.firebase:firebase-storage:16.0.4'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-database:16.0.4' // Realtime Database
implementation 'com.google.firebase:firebase-auth:16.0.4'// Email Password based authentication
implementation 'com.google.android.gms:play-services-auth:16.0.1'// google sign in integration
implementation 'com.facebook.android:facebook-login:4.38.0'// facebook integration


implementation 'com.intuit.ssp:ssp-android:1.0.6'// for text size
implementation 'com.intuit.sdp:sdp-android:1.0.6'// for layout size

implementation 'com.android.support:design:28.0.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
}
apply plugin: 'com.google.gms.google-services'

我不知道这里出了什么问题,也无法弄清楚导致问题发生的原因。我进行了一些搜索,找到了针对与此类似的其他类型错误的其他解决方案,但根本没有帮助。

谁能指出这里真正的问题是什么以及需要修复什么?

任何有关的建议/建议都会非常有帮助。提前致谢。

最佳答案

你可以在你的 build.gradle 中做这样的事情

       android.packagingOptions {
exclude 'META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version'
}

关于android - Gradle 错误 : More than one file was found with OS independent path 'META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53310527/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com