【问题标题】:Could not find com.google.firebase-core:17.0.1:找不到 com.google.firebase-core:17.0.1:
【发布时间】:2019-07-18 11:19:38
【问题描述】:

我正在尝试在项目中实施 Firebase,当我尝试构建应用程序时,我收到以下失败消息:

  • 出了什么问题: 无法确定任务 ':app:preDebugBuild' 的依赖关系。 无法解析配置 ':app:debugRuntimeClasspath' 的所有任务依赖项。 找不到 com.google.firebase-core:17.0.1:。 要求: 项目:应用程序

我的 app/build.gradle 依赖如下:

dependencies {
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    implementation 'com.google.firebase-core:17.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

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

minSdkVersion21

targetSdkVersion28

我的 build.graddle 是这样的:

   buildscript {
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.2.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

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

最后 pubspec.yaml 依赖项是:

dependencies:



  firebase_core: ^0.4.0+6

  firebase_auth: ^0.11.1+10

  firebase_database: ^3.0.4

  http: ^0.12.0+2

  google_sign_in: ^4.0.4

  provider: ^3.0.0+1

有人可以帮我吗?

【问题讨论】:

  • VPN?你能更具体一点吗?为什么选择 VPN?

标签: android firebase flutter dart


【解决方案1】:

我不确定你从哪里得到这条线:

implementation 'com.google.firebase-core:17.0.1'

最新版本的 Firebase 核心依赖项如下所示:

implementation 'com.google.firebase:firebase-core:17.0.1'

我从getting started with Firebase on android 文档中得到这个。

【讨论】:

  • 呸,我在页面上有各种错误,我正在玩代码,所以有一段时间我像“com.google.firebase:firebase-core:”这样离开这一行并且然后我不知道当我找回它时我是如何错过放置“firebase”的。还是谢谢!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-02-19
  • 2016-11-12
  • 2021-09-05
  • 2021-08-01
  • 2017-07-07
  • 1970-01-01
  • 2017-12-18
相关资源
最近更新 更多