无法解析:com.google.firebase:firebase-core:11.2.0 [英] Failed to resolve: com.google.firebase:firebase-core:11.2.0

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

问题描述

同步我的项目时,我收到了多个无法解决问题。他们都是火力和娱乐服务相关的。我确信他们都是一样的(11.2.0)。我也检查了两者的最新版本是11.2.0。另外,类似问题的所有其他答案都涉及更新SDK管理器中的Google播放服务和存储库,但我已经是最新的。





任何想法为什么我不能同步我的项目?

编辑 - 当前工作解决方案

  //顶级构建文件,您可以在其中添加所有子项目/模块共有的配置选项。 

uildscript {
repositories {
jcenter()
}
依赖关系{
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'

//注意:不要在这里放置应用程序依赖关系;它们属于单个模块build.gradle文件中的
//
}
}

allprojects {
repositories {
jcenter()
maven {urlhttps://maven.google.com}
}
}

任务清理(类型:删除){
delete rootProject .buildDir


解决方案

$ c> maven {urlhttps://maven.google.com} 到您的根级别 build.gradle 文件


$ b $ pre $ allprojects {
存储库{
jcenter()
maven {
urlhttps:/ /maven.google.com

}
}


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?

EDIT - Current working solution

// 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
}

解决方案

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆