错误构建渐变



添加应用插件后:'com.google.gms.google-services'。我得到以下错误

同步后发生错误。错误:没有这样的属性:application类的变体:java.lang.String

打开文件。

apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
repositories {
maven { url 'https://jitpack.io' }
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.7.1'
implementation 'com.github.PhilJay:MPAndroidChart:v2.2.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation("com.mikepenz:materialdrawer:6.0.8@aar") {
transitive = true
}
}
apply plugin: 'com.google.gms.google-services'

尝试添加classpath 'com.google.gms:google-services:4.3.3'并删除带有"应用插件"的行。它应该起作用。

最新更新