Gradle Error : More than one file was found with OS independent path...












0














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.



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




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




And my build.gradle from the app is:



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.










share|improve this question





























    0














    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.



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




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




    And my build.gradle from the app is:



    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.










    share|improve this question



























      0












      0








      0







      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.



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




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




      And my build.gradle from the app is:



      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.










      share|improve this question















      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.



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




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




      And my build.gradle from the app is:



      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.







      android gradle android-gradle






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 15 '18 at 1:32









      shizhen

      2,7373730




      2,7373730










      asked Nov 14 '18 at 23:54









      Asif-Ul Islam AkashAsif-Ul Islam Akash

      189




      189
























          2 Answers
          2






          active

          oldest

          votes


















          2














          Try this instead



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






          share|improve this answer





















          • Thank you for your response. Solved !
            – Asif-Ul Islam Akash
            Nov 15 '18 at 13:01










          • But 2.7 has a bug for Android O >= devices. Having the same pain right now of changing to Android X or do a fork
            – Fintasys
            Dec 18 '18 at 9:10



















          1














          You could do something like this in your build.gradle



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





          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53310527%2fgradle-error-more-than-one-file-was-found-with-os-independent-path-meta-inf-a%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            Try this instead



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






            share|improve this answer





















            • Thank you for your response. Solved !
              – Asif-Ul Islam Akash
              Nov 15 '18 at 13:01










            • But 2.7 has a bug for Android O >= devices. Having the same pain right now of changing to Android X or do a fork
              – Fintasys
              Dec 18 '18 at 9:10
















            2














            Try this instead



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






            share|improve this answer





















            • Thank you for your response. Solved !
              – Asif-Ul Islam Akash
              Nov 15 '18 at 13:01










            • But 2.7 has a bug for Android O >= devices. Having the same pain right now of changing to Android X or do a fork
              – Fintasys
              Dec 18 '18 at 9:10














            2












            2








            2






            Try this instead



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






            share|improve this answer












            Try this instead



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







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 15 '18 at 7:00









            IndarkIndark

            887




            887












            • Thank you for your response. Solved !
              – Asif-Ul Islam Akash
              Nov 15 '18 at 13:01










            • But 2.7 has a bug for Android O >= devices. Having the same pain right now of changing to Android X or do a fork
              – Fintasys
              Dec 18 '18 at 9:10


















            • Thank you for your response. Solved !
              – Asif-Ul Islam Akash
              Nov 15 '18 at 13:01










            • But 2.7 has a bug for Android O >= devices. Having the same pain right now of changing to Android X or do a fork
              – Fintasys
              Dec 18 '18 at 9:10
















            Thank you for your response. Solved !
            – Asif-Ul Islam Akash
            Nov 15 '18 at 13:01




            Thank you for your response. Solved !
            – Asif-Ul Islam Akash
            Nov 15 '18 at 13:01












            But 2.7 has a bug for Android O >= devices. Having the same pain right now of changing to Android X or do a fork
            – Fintasys
            Dec 18 '18 at 9:10




            But 2.7 has a bug for Android O >= devices. Having the same pain right now of changing to Android X or do a fork
            – Fintasys
            Dec 18 '18 at 9:10













            1














            You could do something like this in your build.gradle



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





            share|improve this answer


























              1














              You could do something like this in your build.gradle



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





              share|improve this answer
























                1












                1








                1






                You could do something like this in your build.gradle



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





                share|improve this answer












                You could do something like this in your build.gradle



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






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 15 '18 at 7:09









                Ramesh YankatiRamesh Yankati

                65848




                65848






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53310527%2fgradle-error-more-than-one-file-was-found-with-os-independent-path-meta-inf-a%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Guess what letter conforming each word

                    Port of Spain

                    Run scheduled task as local user group (not BUILTIN)