Я создал проект Firestore в Android Studio. В котором у меня реализована авторизация Firebase и она работает абсолютно нормально. Я могу отправить документы в базу данных Firestore.
Но сейчас я пытаюсь добавить функциональность, с помощью которой я могу хранить мультимедиа / изображения в Firebase Storage, но когда я добавляю эту зависимость в файл build.gradle приложения, я получаю эту ошибку:
Зависимость добавлена:
implementation 'com.google.firebase:firebase-storage:16.0.1'
Это ошибка, которую я получаю:
Could not find firebase-common.jar (com.google.firebase:firebase-common:16.0.0).
Searched in the following locations:https://jcenter.bintray.com/com/google/firebase/firebase-common/16.0.0/firebase-common-16.0.0.jar
К вашему сведению, в моем проекте у меня уже есть такая конфигурация:
classpath 'com.android.tools.build:gradle:3.1.3'
И
apply plugin: 'com.google.gms.google-services'
Я не могу найти, что происходит, когда я просто добавляю зависимость firebase-storage в мой проект Android.
Вот файл уровня моего приложения build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.firebase.example"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
}
dependencies {
implementation 'com.google.firebase:firebase-firestore:16.0.0'
implementation 'com.google.firebase:firebase-auth:15.1.0'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:23.2.1'
implementation 'com.android.support:design:23.2.1'
implementation 'com.android.support:recyclerview-v7:23.2.1'
}
apply plugin: 'com.google.gms.google-services'
Вот мой файл уровня модуля build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.1' // google-services plugin
classpath 'com.google.android.gms:play-services-base:15.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}