Плагин с идентификатором com.google.firebase.appdistribution не найден
Я пытаюсь добавить распространение приложений Firebase через Gradle в свое приложение для Android и вижу эту ошибку: "Плагин с идентификатором com.google.firebase.appdistribution не найден".
Приложение будет нормально построено, если я закомментирую "применить плагин:" com.google.firebase.appdistribution ".
Я создал новый образец приложения и просто пытаюсь собрать его с помощью плагина com.google.firebase.appdistribution. Я выполнил эти шаги до T (https://firebase.google.com/docs/app-distribution/android/distribute-gradle) и все еще вижу эту ошибку
Вот мой модуль приложения build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.firebase.appdistribution'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
repositories {
google()
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'com.google.firebase:firebase-appdistribution-gradle:1.1.0'
implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation 'com.google.firebase:firebase-auth:19.1.0'
implementation 'com.google.firebase:firebase-firestore:21.2.1'
}
apply plugin: 'com.google.gms.google-services' // Google Play services Gradle plugin
Я ожидаю, что он хотя бы построит, но кажется, что он даже не может найти плагин. Неправильно загрузили что ли?
1 ответ
Это не зависимость от Java; это читаетclasspath
и нет implementation
.
Вам нужно будет добавить этот плагин Gradle в корневой проект проекта build.gradle
:
buildscript {
repositories {
google()
}
dependencies {
classpath "com.google.firebase:firebase-appdistribution-gradle:1.1.0"
}
}