本文介绍了Gradle错误:使用操作系统独立路径"META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version"找到了多个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Android应用程序需要 android-image-cropper 库,因此我将其添加到了gradle依赖项中.同步后,出现了许多错误.

I needed android-image-cropper library for my android app and so i added it to the gradle dependency. After syncing, a number of errors were showing up.

这里是一个,gradle无法解决:

Here's one and the gradle won't fix:

我在应用程序中的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'

我不知道这里出了什么问题,也无法找出导致问题发生的原因.我进行了一些搜索,找到了其他类似的解决方法来解决与此类似的其他类型的错误,但是完全没有帮助.

I don't know what is wrong here and could not figure it out what causes the issues to be occurred. I searched a little bit and find some other solution to other type of errors similar to this, but didn't help at all.

任何人都可以提出这里的真正错误和需要解决的问题吗?

Could anyone suggests what is really wrong here and what needs to be fixed?

任何有关建议/建议的建议都会很有帮助.预先感谢.

Any regarding advices/suggestions would be very much helpful. Thanks in advance.

推荐答案

尝试尝试

api'com.theartofdev.edmodo:android-image-cropper:2.7.0'

api 'com.theartofdev.edmodo:android-image-cropper:2.7.0'

这篇关于Gradle错误:使用操作系统独立路径"META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version"找到了多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 10:21