Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve...
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.

add a comment |
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.

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
add a comment |
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.

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.

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
add a comment |
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
add a comment |
3 Answers
3
active
oldest
votes
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
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
add a comment |
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
Have you tried my solution above, does it work?
– Alex Mamo
Jul 28 '18 at 8:56
add a comment |
Add Maven to your project.gradle in repositories
LIKE THIS
repositories{
google()
jcenter()
maven{
url "https://maven.google.com"
}
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
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
Have you tried my solution above, does it work?
– Alex Mamo
Jul 28 '18 at 8:56
add a comment |
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
Have you tried my solution above, does it work?
– Alex Mamo
Jul 28 '18 at 8:56
add a comment |
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
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
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
add a comment |
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
add a comment |
Add Maven to your project.gradle in repositories
LIKE THIS
repositories{
google()
jcenter()
maven{
url "https://maven.google.com"
}
add a comment |
Add Maven to your project.gradle in repositories
LIKE THIS
repositories{
google()
jcenter()
maven{
url "https://maven.google.com"
}
add a comment |
Add Maven to your project.gradle in repositories
LIKE THIS
repositories{
google()
jcenter()
maven{
url "https://maven.google.com"
}
Add Maven to your project.gradle in repositories
LIKE THIS
repositories{
google()
jcenter()
maven{
url "https://maven.google.com"
}
answered Nov 20 '18 at 19:27
raymond musabandesuraymond musabandesu
1
1
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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

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