Я подключаю сервисы firebase и получаю ошибку
Could not initialize class com.android.build.gradle.internal.dsl.decorator.AndroidPluginDslDecoratorKt
Полный стек
FAILURE: Build failed with an exception.
* What went wrong:
Could not initialize class com.android.build.gradle.internal.dsl.decorator.AndroidPluginDslDecoratorKt
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Exception is:
java.lang.NoClassDefFoundError: Could not initialize class com.android.build.gradle.internal.dsl.decorator.AndroidPluginDslDecoratorKt
at com.android.build.gradle.internal.services.DslServicesImpl.newDecoratedInstance(DslServicesImpl.kt:73)
at com.android.build.gradle.internal.variant.LegacyVariantInputManager.<init>(LegacyVariantInputManager.kt:74)
at com.android.build.gradle.internal.plugins.BasePlugin.configureExtension(BasePlugin.java:557)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:69)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:54)
Когда удаляю код ниже то работает без проблем
buildscript {
dependencies {
classpath 'com.google.gms:google-services:4.4.0'
}
}
Вот полный градл проекта
buildscript {
dependencies {
classpath 'com.google.gms:google-services:4.4.0'
}
}
plugins {
id 'com.android.application' version '7.2.1' apply false
id 'com.android.library' version '7.2.1' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Полный градл приложения
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
buildFeatures {
viewBinding true
}
compileSdk 33
defaultConfig {
applicationId "com.predictor.aviatorgpt"
minSdk 21
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.firebase:firebase-messaging:23.3.0'
implementation 'com.google.firebase:firebase-analytics:21.4.0'
implementation platform('com.google.firebase:firebase-bom:32.4.0')
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}