【发布时间】:2018-07-10 17:54:25
【问题描述】:
我想在应用程序中添加 Firestore,我的 android studio 版本是 2.3.2,但我无法在 Firebase 助手中看到 firestore 选项,当我为 Firestore 添加库时:-
compile 'com.google.firebase:firebase-firestore:10.0.1'
它向我显示了这个错误:-
Error:(32, 13) Failed to resolve: com.google.firebase:firebase-firestore:10.0.1
请帮我解决这个问题!!
这是我的应用级构建等级文件:-
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "in.anew.trysafeblog"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.5.+'
compile 'com.google.firebase:firebase-storage:10.0.1'
compile 'com.google.firebase:firebase-firestore:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
请帮帮我!!! 构建 gradle 文件:-
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.0.1'
//classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
【问题讨论】:
-
您可以添加“解析失败”的详细日志。
标签: android firebase android-studio google-cloud-firestore android-library