【发布时间】: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