Jet*_*o82 2 android firebase firebase-app-distribution
我正在尝试通过 Gradle 将 Firebase 应用分发添加到我的 Android 应用中,并看到此错误:“未找到 ID 为 'com.google.firebase.appdistribution' 的插件。”
如果我注释掉 'apply plugin: '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
Run Code Online (Sandbox Code Playgroud)
我希望它至少可以构建,但似乎甚至找不到插件。是上传错误还是什么?
This is not a Java dependency; it reads classpath and not implementation.
You'd need to add that Gradle plugin into the root project's build.gradle:
buildscript {
repositories {
google()
}
dependencies {
classpath "com.google.firebase:firebase-appdistribution-gradle:1.1.0"
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1216 次 |
| 最近记录: |