gpt4 book ai didi

android - 无法为抽象类 'GoogleServicesTask' 创建代理类。与 'com.google.gms:google-services:4.3.4'

转载 作者:行者123 更新时间:2023-12-03 13:24:51 37 4
gpt4 key购买 nike

昨晚将 Fabrics crashlytics 升级到 Firebase。
当我尝试重建应用程序时,它遇到了很多问题,我一一修复了这些问题,但最后一个问题被卡住了:

Cannot create a proxy class for abstract class 'GoogleServicesTask'


应用程序/构建
buildscript {
ext.kotlin_version = '1.3.41'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.4'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
在我的 app/gradle 文件中,我有
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.xxx.xxxx"
minSdkVersion 19
targetSdkVersion 29
versionCode 23
versionName "1.1.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
firebaseCrashlytics {
mappingFileUploadEnabled false
}
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
dependencies { my all dependencies}
apply plugin: 'com.google.gms.google-services'

最佳答案

更好地更新这个过时的 Android Gradle 插件:

classpath "com.android.tools.build:gradle:3.4.2"
到与 Android Studio 版本相匹配的版本...
classpath "com.android.tools.build:gradle:7.0.2"

关于android - 无法为抽象类 'GoogleServicesTask' 创建代理类。与 'com.google.gms:google-services:4.3.4',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64201624/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com