无法解决:com.google.firebase:firebase-core:11.2.0

Failed to resolve: com.google.firebase:firebase-core:11.2.0(无法解决:com.google.firebase:firebase-core:11.2.0)
本文介绍了无法解决:com.google.firebase:firebase-core:11.2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在同步我的项目时,我遇到了多个无法解决"问题.它们都与 firebase 和 play-services 相关.我确保它们都是相同的(11.2.0).我也检查过,两者的最新版本都是 11.2.0.此外,类似问题的所有其他答案都涉及更新 SDK 管理器中的 Google Play 服务和存储库,但我的已经是最新的.

I'm getting multiple "Failed to Resolve" issues when syncing my project. They are all firebase and play-services related. I made sure they are all the same (11.2.0). I've also checked and the latest version for both is 11.2.0. Also, all the other answers to similar questions involve updating Google play services and repository in the SDK Manager but mine is already up to date.

知道为什么我不能同步我的项目吗?

Any idea why I can't sync my project?

编辑 - 当前工作解决方案

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'
        classpath 'com.google.gms:google-services:3.0.0'
        classpath 'com.google.firebase:firebase-plugins:1.0.4'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

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

task clean(type: Delete) {
    delete rootProject.buildDir
}

推荐答案

maven { url "https://maven.google.com" } 添加到您的根级别 build.gradle 文件

Add maven { url "https://maven.google.com" } to your root level build.gradle file

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

这篇关于无法解决:com.google.firebase:firebase-core:11.2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)