android - 无法解决:Android Studio 3.1.3 中的 com.google
问题描述
添加 Firebase 依赖项会出现以下错误:
Failed to resolve: com.google
`
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.xxxxxxx.xxxxx"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.google.firebase: firebase-core: 16.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
`
我提到了“无法解决:com.google.firebase:firebase-core:9.0.0 ”,但是没有用。先感谢您。
解决方案
检查这一行和implementation 'com.google.firebase: firebase-core: 16.0.0'
之间有一个空格。删除那些空格com.google.firebase:
firebase-core:16.0.0
推荐阅读
- spring - Spring boot 安全登录总是运行错误,没有描述
- java - Validator spring 错误的目标无效?
- python - Tweepy 流:TypeError:“NoneType”对象不可下标
- r - 无法使用 %in% 将列表传递给 dplyr 过滤器
- java - 具有序列化对象列的 Ebean 数据库模型
- json - 如何递归地将JSON字符串中的所有数组转换为Delphi中的数据集?
- r - Case_when 错误'x 必须是字符向量,而不是双向量'?
- python - 如何将 2 元素列表作为键/值对添加到 python 字典中?
- python-3.x - 在 Windows 10 中安装 fastparquet 时出错
- python - predict_proba() 中的前 3 个类