Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve...












0















Currently, I am working on an android chat application. I want to add FCM in my app. But I am always getting this gradle error. From what I have read, the firebase auth, database and messaging dependency version should match. I have tried every version, still, the same error occurs.



Snapshot of problem










share|improve this question

























  • post the error as a text if possible?

    – Irfan
    Jul 27 '18 at 5:21






  • 1





    check this stackoverflow.com/questions/45617237/…

    – Thunder
    Jul 27 '18 at 5:25











  • Please post your error log and build.gradle file

    – Rajshree Tiwari
    Jul 27 '18 at 5:27











  • check this link stackoverflow.com/a/47833606/2919483 hope it may help you.

    – Rajshree Tiwari
    Jul 27 '18 at 5:30
















0















Currently, I am working on an android chat application. I want to add FCM in my app. But I am always getting this gradle error. From what I have read, the firebase auth, database and messaging dependency version should match. I have tried every version, still, the same error occurs.



Snapshot of problem










share|improve this question

























  • post the error as a text if possible?

    – Irfan
    Jul 27 '18 at 5:21






  • 1





    check this stackoverflow.com/questions/45617237/…

    – Thunder
    Jul 27 '18 at 5:25











  • Please post your error log and build.gradle file

    – Rajshree Tiwari
    Jul 27 '18 at 5:27











  • check this link stackoverflow.com/a/47833606/2919483 hope it may help you.

    – Rajshree Tiwari
    Jul 27 '18 at 5:30














0












0








0








Currently, I am working on an android chat application. I want to add FCM in my app. But I am always getting this gradle error. From what I have read, the firebase auth, database and messaging dependency version should match. I have tried every version, still, the same error occurs.



Snapshot of problem










share|improve this question
















Currently, I am working on an android chat application. I want to add FCM in my app. But I am always getting this gradle error. From what I have read, the firebase auth, database and messaging dependency version should match. I have tried every version, still, the same error occurs.



Snapshot of problem







android firebase dependencies






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 27 '18 at 5:20









Nilesh Rathod

31.5k82956




31.5k82956










asked Jul 27 '18 at 5:19









HasanHasan

1




1













  • post the error as a text if possible?

    – Irfan
    Jul 27 '18 at 5:21






  • 1





    check this stackoverflow.com/questions/45617237/…

    – Thunder
    Jul 27 '18 at 5:25











  • Please post your error log and build.gradle file

    – Rajshree Tiwari
    Jul 27 '18 at 5:27











  • check this link stackoverflow.com/a/47833606/2919483 hope it may help you.

    – Rajshree Tiwari
    Jul 27 '18 at 5:30



















  • post the error as a text if possible?

    – Irfan
    Jul 27 '18 at 5:21






  • 1





    check this stackoverflow.com/questions/45617237/…

    – Thunder
    Jul 27 '18 at 5:25











  • Please post your error log and build.gradle file

    – Rajshree Tiwari
    Jul 27 '18 at 5:27











  • check this link stackoverflow.com/a/47833606/2919483 hope it may help you.

    – Rajshree Tiwari
    Jul 27 '18 at 5:30

















post the error as a text if possible?

– Irfan
Jul 27 '18 at 5:21





post the error as a text if possible?

– Irfan
Jul 27 '18 at 5:21




1




1





check this stackoverflow.com/questions/45617237/…

– Thunder
Jul 27 '18 at 5:25





check this stackoverflow.com/questions/45617237/…

– Thunder
Jul 27 '18 at 5:25













Please post your error log and build.gradle file

– Rajshree Tiwari
Jul 27 '18 at 5:27





Please post your error log and build.gradle file

– Rajshree Tiwari
Jul 27 '18 at 5:27













check this link stackoverflow.com/a/47833606/2919483 hope it may help you.

– Rajshree Tiwari
Jul 27 '18 at 5:30





check this link stackoverflow.com/a/47833606/2919483 hope it may help you.

– Rajshree Tiwari
Jul 27 '18 at 5:30












3 Answers
3






active

oldest

votes


















0














You must have forgotten to add google() // Google's Maven repository in build.gradle.



allprojects {
// ...
repositories {
// ...
google() // Google's Maven repository
}
}


Here is the comment from firebase docs:




// Getting a "Could not find" error? Make sure you have



// added the Google maven respository to your root build.gradle




Here is the reference: link






share|improve this answer
























  • it is added allprojects { repositories { google() jcenter() } }

    – Hasan
    Jul 27 '18 at 5:32











  • Alright. Can you please add your gradle files to question

    – mark922
    Jul 27 '18 at 5:33



















0














To solve this, please chnage the following line of code:



com.google.firebase:firebase-auth:16.0.1


to



com.google.firebase:firebase-auth:16.0.2


and add:



com.google.firebase:firebase-core:16.0.1


Which is mandatory now. Don't also forget to add:



apply plugin: 'com.google.gms.google-services'


At the end of your file and the following line of code:



classpath 'com.google.gms:google-services:4.0.2'


Into your build.gradle file (Project).



PS. If you are using Firebase-UI auth, add also this line of code:



com.firebaseui:firebase-ui-auth:4.0.1





share|improve this answer
























  • Have you tried my solution above, does it work?

    – Alex Mamo
    Jul 28 '18 at 8:56



















0














Add Maven to your project.gradle in repositories
LIKE THIS



repositories{ 
google()
jcenter()
maven{
url "https://maven.google.com"
}





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%2f51551190%2funable-to-resolve-dependency-for-appdebug-compileclasspath-could-not-resolv%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You must have forgotten to add google() // Google's Maven repository in build.gradle.



    allprojects {
    // ...
    repositories {
    // ...
    google() // Google's Maven repository
    }
    }


    Here is the comment from firebase docs:




    // Getting a "Could not find" error? Make sure you have



    // added the Google maven respository to your root build.gradle




    Here is the reference: link






    share|improve this answer
























    • it is added allprojects { repositories { google() jcenter() } }

      – Hasan
      Jul 27 '18 at 5:32











    • Alright. Can you please add your gradle files to question

      – mark922
      Jul 27 '18 at 5:33
















    0














    You must have forgotten to add google() // Google's Maven repository in build.gradle.



    allprojects {
    // ...
    repositories {
    // ...
    google() // Google's Maven repository
    }
    }


    Here is the comment from firebase docs:




    // Getting a "Could not find" error? Make sure you have



    // added the Google maven respository to your root build.gradle




    Here is the reference: link






    share|improve this answer
























    • it is added allprojects { repositories { google() jcenter() } }

      – Hasan
      Jul 27 '18 at 5:32











    • Alright. Can you please add your gradle files to question

      – mark922
      Jul 27 '18 at 5:33














    0












    0








    0







    You must have forgotten to add google() // Google's Maven repository in build.gradle.



    allprojects {
    // ...
    repositories {
    // ...
    google() // Google's Maven repository
    }
    }


    Here is the comment from firebase docs:




    // Getting a "Could not find" error? Make sure you have



    // added the Google maven respository to your root build.gradle




    Here is the reference: link






    share|improve this answer













    You must have forgotten to add google() // Google's Maven repository in build.gradle.



    allprojects {
    // ...
    repositories {
    // ...
    google() // Google's Maven repository
    }
    }


    Here is the comment from firebase docs:




    // Getting a "Could not find" error? Make sure you have



    // added the Google maven respository to your root build.gradle




    Here is the reference: link







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 27 '18 at 5:30









    mark922mark922

    7551516




    7551516













    • it is added allprojects { repositories { google() jcenter() } }

      – Hasan
      Jul 27 '18 at 5:32











    • Alright. Can you please add your gradle files to question

      – mark922
      Jul 27 '18 at 5:33



















    • it is added allprojects { repositories { google() jcenter() } }

      – Hasan
      Jul 27 '18 at 5:32











    • Alright. Can you please add your gradle files to question

      – mark922
      Jul 27 '18 at 5:33

















    it is added allprojects { repositories { google() jcenter() } }

    – Hasan
    Jul 27 '18 at 5:32





    it is added allprojects { repositories { google() jcenter() } }

    – Hasan
    Jul 27 '18 at 5:32













    Alright. Can you please add your gradle files to question

    – mark922
    Jul 27 '18 at 5:33





    Alright. Can you please add your gradle files to question

    – mark922
    Jul 27 '18 at 5:33













    0














    To solve this, please chnage the following line of code:



    com.google.firebase:firebase-auth:16.0.1


    to



    com.google.firebase:firebase-auth:16.0.2


    and add:



    com.google.firebase:firebase-core:16.0.1


    Which is mandatory now. Don't also forget to add:



    apply plugin: 'com.google.gms.google-services'


    At the end of your file and the following line of code:



    classpath 'com.google.gms:google-services:4.0.2'


    Into your build.gradle file (Project).



    PS. If you are using Firebase-UI auth, add also this line of code:



    com.firebaseui:firebase-ui-auth:4.0.1





    share|improve this answer
























    • Have you tried my solution above, does it work?

      – Alex Mamo
      Jul 28 '18 at 8:56
















    0














    To solve this, please chnage the following line of code:



    com.google.firebase:firebase-auth:16.0.1


    to



    com.google.firebase:firebase-auth:16.0.2


    and add:



    com.google.firebase:firebase-core:16.0.1


    Which is mandatory now. Don't also forget to add:



    apply plugin: 'com.google.gms.google-services'


    At the end of your file and the following line of code:



    classpath 'com.google.gms:google-services:4.0.2'


    Into your build.gradle file (Project).



    PS. If you are using Firebase-UI auth, add also this line of code:



    com.firebaseui:firebase-ui-auth:4.0.1





    share|improve this answer
























    • Have you tried my solution above, does it work?

      – Alex Mamo
      Jul 28 '18 at 8:56














    0












    0








    0







    To solve this, please chnage the following line of code:



    com.google.firebase:firebase-auth:16.0.1


    to



    com.google.firebase:firebase-auth:16.0.2


    and add:



    com.google.firebase:firebase-core:16.0.1


    Which is mandatory now. Don't also forget to add:



    apply plugin: 'com.google.gms.google-services'


    At the end of your file and the following line of code:



    classpath 'com.google.gms:google-services:4.0.2'


    Into your build.gradle file (Project).



    PS. If you are using Firebase-UI auth, add also this line of code:



    com.firebaseui:firebase-ui-auth:4.0.1





    share|improve this answer













    To solve this, please chnage the following line of code:



    com.google.firebase:firebase-auth:16.0.1


    to



    com.google.firebase:firebase-auth:16.0.2


    and add:



    com.google.firebase:firebase-core:16.0.1


    Which is mandatory now. Don't also forget to add:



    apply plugin: 'com.google.gms.google-services'


    At the end of your file and the following line of code:



    classpath 'com.google.gms:google-services:4.0.2'


    Into your build.gradle file (Project).



    PS. If you are using Firebase-UI auth, add also this line of code:



    com.firebaseui:firebase-ui-auth:4.0.1






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 27 '18 at 9:16









    Alex MamoAlex Mamo

    41.8k72859




    41.8k72859













    • Have you tried my solution above, does it work?

      – Alex Mamo
      Jul 28 '18 at 8:56



















    • Have you tried my solution above, does it work?

      – Alex Mamo
      Jul 28 '18 at 8:56

















    Have you tried my solution above, does it work?

    – Alex Mamo
    Jul 28 '18 at 8:56





    Have you tried my solution above, does it work?

    – Alex Mamo
    Jul 28 '18 at 8:56











    0














    Add Maven to your project.gradle in repositories
    LIKE THIS



    repositories{ 
    google()
    jcenter()
    maven{
    url "https://maven.google.com"
    }





    share|improve this answer




























      0














      Add Maven to your project.gradle in repositories
      LIKE THIS



      repositories{ 
      google()
      jcenter()
      maven{
      url "https://maven.google.com"
      }





      share|improve this answer


























        0












        0








        0







        Add Maven to your project.gradle in repositories
        LIKE THIS



        repositories{ 
        google()
        jcenter()
        maven{
        url "https://maven.google.com"
        }





        share|improve this answer













        Add Maven to your project.gradle in repositories
        LIKE THIS



        repositories{ 
        google()
        jcenter()
        maven{
        url "https://maven.google.com"
        }






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 20 '18 at 19:27









        raymond musabandesuraymond musabandesu

        1




        1






























            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51551190%2funable-to-resolve-dependency-for-appdebug-compileclasspath-could-not-resolv%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

            The term 'EXEC' is not recognized as the name of a cmdlet Powershell

            NPM command prompt closes immediately [closed]

            Error binding properties and functions in emscripten