How to reolve error gradle sync failed the library being requested by various other libraries?
I wanted to implement firestore in my project but after adding the following line my gradle sync is failing
implementation 'com.google.firebase:firebase-firestore:17.1.2'
and i am getting the error
Gradle sync failed: The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
Consult IDE log for more details (Help | Show Log)
what is this error and how to resolve it
also the classpath I am using is
classpath 'com.google.gms:google-services:4.1.0'
android firebase android-studio
add a comment |
I wanted to implement firestore in my project but after adding the following line my gradle sync is failing
implementation 'com.google.firebase:firebase-firestore:17.1.2'
and i am getting the error
Gradle sync failed: The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
Consult IDE log for more details (Help | Show Log)
what is this error and how to resolve it
also the classpath I am using is
classpath 'com.google.gms:google-services:4.1.0'
android firebase android-studio
Can I see your dependencies?
– Hello World
Nov 23 '18 at 8:37
add a comment |
I wanted to implement firestore in my project but after adding the following line my gradle sync is failing
implementation 'com.google.firebase:firebase-firestore:17.1.2'
and i am getting the error
Gradle sync failed: The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
Consult IDE log for more details (Help | Show Log)
what is this error and how to resolve it
also the classpath I am using is
classpath 'com.google.gms:google-services:4.1.0'
android firebase android-studio
I wanted to implement firestore in my project but after adding the following line my gradle sync is failing
implementation 'com.google.firebase:firebase-firestore:17.1.2'
and i am getting the error
Gradle sync failed: The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
Consult IDE log for more details (Help | Show Log)
what is this error and how to resolve it
also the classpath I am using is
classpath 'com.google.gms:google-services:4.1.0'
android firebase android-studio
android firebase android-studio
edited Nov 23 '18 at 9:40
Aniruddh Parihar
2,15911027
2,15911027
asked Nov 23 '18 at 8:32
Omkar Nadkarni
173
173
Can I see your dependencies?
– Hello World
Nov 23 '18 at 8:37
add a comment |
Can I see your dependencies?
– Hello World
Nov 23 '18 at 8:37
Can I see your dependencies?
– Hello World
Nov 23 '18 at 8:37
Can I see your dependencies?
– Hello World
Nov 23 '18 at 8:37
add a comment |
3 Answers
3
active
oldest
votes
downgrade the used library to the version shown in console. That is
implementation 'com.google.firebase:firebase-firestore:15.0.1'
This happens due to conflicting versions
thanks that worked but if i want to use latest version how do i do that ?
– Omkar Nadkarni
Nov 23 '18 at 9:14
I get this error too, and as of the present this solution works for me. The latest versions currently don't offer any specific new functionalities in my experience. Not all new libraries are released with the latest version simultaneously, and in the in-between transition time, this is how to go by. Although it's a good practice to used the latest versions, that should not be of much concern in the present
– C Forge
Nov 23 '18 at 10:07
add a comment |
Check this gradle file for project level
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.30'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
add a comment |
check this one, I just created for particular issue never tested
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.google.firebase') {
if (!requested.name.startsWith("firebase-firestore")) {
details.useVersion '17.1.2'
}
}
}
}
add this one in defaultConfig
tag in app gradle file
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%2f53443083%2fhow-to-reolve-error-gradle-sync-failed-the-library-being-requested-by-various-ot%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
downgrade the used library to the version shown in console. That is
implementation 'com.google.firebase:firebase-firestore:15.0.1'
This happens due to conflicting versions
thanks that worked but if i want to use latest version how do i do that ?
– Omkar Nadkarni
Nov 23 '18 at 9:14
I get this error too, and as of the present this solution works for me. The latest versions currently don't offer any specific new functionalities in my experience. Not all new libraries are released with the latest version simultaneously, and in the in-between transition time, this is how to go by. Although it's a good practice to used the latest versions, that should not be of much concern in the present
– C Forge
Nov 23 '18 at 10:07
add a comment |
downgrade the used library to the version shown in console. That is
implementation 'com.google.firebase:firebase-firestore:15.0.1'
This happens due to conflicting versions
thanks that worked but if i want to use latest version how do i do that ?
– Omkar Nadkarni
Nov 23 '18 at 9:14
I get this error too, and as of the present this solution works for me. The latest versions currently don't offer any specific new functionalities in my experience. Not all new libraries are released with the latest version simultaneously, and in the in-between transition time, this is how to go by. Although it's a good practice to used the latest versions, that should not be of much concern in the present
– C Forge
Nov 23 '18 at 10:07
add a comment |
downgrade the used library to the version shown in console. That is
implementation 'com.google.firebase:firebase-firestore:15.0.1'
This happens due to conflicting versions
downgrade the used library to the version shown in console. That is
implementation 'com.google.firebase:firebase-firestore:15.0.1'
This happens due to conflicting versions
answered Nov 23 '18 at 8:57
C Forge
1148
1148
thanks that worked but if i want to use latest version how do i do that ?
– Omkar Nadkarni
Nov 23 '18 at 9:14
I get this error too, and as of the present this solution works for me. The latest versions currently don't offer any specific new functionalities in my experience. Not all new libraries are released with the latest version simultaneously, and in the in-between transition time, this is how to go by. Although it's a good practice to used the latest versions, that should not be of much concern in the present
– C Forge
Nov 23 '18 at 10:07
add a comment |
thanks that worked but if i want to use latest version how do i do that ?
– Omkar Nadkarni
Nov 23 '18 at 9:14
I get this error too, and as of the present this solution works for me. The latest versions currently don't offer any specific new functionalities in my experience. Not all new libraries are released with the latest version simultaneously, and in the in-between transition time, this is how to go by. Although it's a good practice to used the latest versions, that should not be of much concern in the present
– C Forge
Nov 23 '18 at 10:07
thanks that worked but if i want to use latest version how do i do that ?
– Omkar Nadkarni
Nov 23 '18 at 9:14
thanks that worked but if i want to use latest version how do i do that ?
– Omkar Nadkarni
Nov 23 '18 at 9:14
I get this error too, and as of the present this solution works for me. The latest versions currently don't offer any specific new functionalities in my experience. Not all new libraries are released with the latest version simultaneously, and in the in-between transition time, this is how to go by. Although it's a good practice to used the latest versions, that should not be of much concern in the present
– C Forge
Nov 23 '18 at 10:07
I get this error too, and as of the present this solution works for me. The latest versions currently don't offer any specific new functionalities in my experience. Not all new libraries are released with the latest version simultaneously, and in the in-between transition time, this is how to go by. Although it's a good practice to used the latest versions, that should not be of much concern in the present
– C Forge
Nov 23 '18 at 10:07
add a comment |
Check this gradle file for project level
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.30'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
add a comment |
Check this gradle file for project level
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.30'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
add a comment |
Check this gradle file for project level
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.30'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Check this gradle file for project level
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.30'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
answered Nov 23 '18 at 8:37
Android Team
7,47411033
7,47411033
add a comment |
add a comment |
check this one, I just created for particular issue never tested
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.google.firebase') {
if (!requested.name.startsWith("firebase-firestore")) {
details.useVersion '17.1.2'
}
}
}
}
add this one in defaultConfig
tag in app gradle file
add a comment |
check this one, I just created for particular issue never tested
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.google.firebase') {
if (!requested.name.startsWith("firebase-firestore")) {
details.useVersion '17.1.2'
}
}
}
}
add this one in defaultConfig
tag in app gradle file
add a comment |
check this one, I just created for particular issue never tested
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.google.firebase') {
if (!requested.name.startsWith("firebase-firestore")) {
details.useVersion '17.1.2'
}
}
}
}
add this one in defaultConfig
tag in app gradle file
check this one, I just created for particular issue never tested
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.google.firebase') {
if (!requested.name.startsWith("firebase-firestore")) {
details.useVersion '17.1.2'
}
}
}
}
add this one in defaultConfig
tag in app gradle file
answered Nov 23 '18 at 10:37
Basi
443212
443212
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.
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.
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%2f53443083%2fhow-to-reolve-error-gradle-sync-failed-the-library-being-requested-by-various-ot%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
Can I see your dependencies?
– Hello World
Nov 23 '18 at 8:37