Android Studio:评估项目“:app”时出现问题

我的 Kotlin 应用使用的是 Android Studio。 最近我更新了android studio。但是现在每次运行应用程序时都会出错。 显然,问题来自 gradle(第 14 行)。

我真的不知道如何解决它。 你能帮我吗?

这里是错误:

评估项目“:app”时出现问题。

无方法签名:build_6uagmflxzjlqlj4243au2e0ba.android() 适用于参数类型:(build_6uagmflxzjlqlj4243au2e0ba$_run_closure2) 值:[build_6uagmflxzjlqlj4027b_run_closure2] 值:[build_6uagmflxzjlqlj4027brun_closure2]

和 gradle :

    plugins {
        id 'com.android.application'
        id 'com.google.gms.google-services'
        id 'kotlin-android'
        id 'kotlin-android-extensions'
        id 'kotlin-kapt'
        id 'androidx.navigation.safeargs'
    }
    
    androidExtensions {
        experimental = true
    }
    
// ERROR COME FROM THIS LINE BELLOW <-----------------------
    android {
        compileSdkVersion 30
    
        defaultConfig {
            applicationid "com.example.givenaskv1"
            minSdkVersion 23
            targetSdkVersion 30
            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
        }
    
    
    
        kotlinOptions {
            jvmTarget = '1.8'
        }
    
    
    
        dataBinding {
            enabled true
        }
    
    def lifeCycleExtensionVersion = '1.1.1'
    def supportVersion = '28.0.0'
    def retrofitVersion = '2.3.0'
    def glideVersion = '4.9.0'
    def rxJavaVersion = '2.1.1'
    def navVersion = '2.1.0-alpha05'
    def preferencesVersion = '1.0.0'
    
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    
        implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
        implementation 'androidx.core:core-ktx:1.6.0'
        implementation 'androidx.appcompat:appcompat:1.3.1'
        implementation 'com.google.android.material:material:1.4.0'
        implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
        implementation 'com.google.firebase:firebase-auth:21.0.1'
    
        implementation platform('com.google.firebase:firebase-bom:27.0.0')
        implementation 'com.google.firebase:firebase-analytics-ktx'
    
    
        implementation "android.arch.lifecycle:extensions:$lifeCycleExtensionVersion"
    
    
        //noinspection GradleDependency
        implementation "androidx.navigation:navigation-fragment-ktx:$navVersion"
        //noinspection GradleDependency
        implementation "androidx.navigation:navigation-ui-ktx:$navVersion"
    
        implementation "com.google.android.material:material:1.4.0"
    
        implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
        implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
        implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
    
        implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
        implementation "io.reactivex.rxjava2:rxandroid:$rxJavaVersion"
    
        //noinspection GradleCompatible
        implementation 'com.android.support:design:26.1.0'
        implementation 'com.google.android.gms:play-services-maps:17.0.1'
        implementation 'com.google.android.gms:play-services-location:18.0.0'
        implementation 'androidx.legacy:legacy-support-v4:1.0.0'
        testImplementation 'junit:junit:4.13.2'
        androidTestImplementation 'androidx.test.ext:junit:1.1.3'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    
        implementation "androidx.viewpager2:viewpager2:1.0.0"
        implementation 'me.relex:circleindicator:2.1.4'
        implementation 'androidx.cardview:cardview:1.0.0'
        implementation 'com.google.android.material:material:1.4.0'
        implementation 'com.jaeger.statusbarutil:library:1.4.0'
    
        // Bottom Sheet Dialog
        // Material Design
        implementation 'com.google.android.material:material:1.5.0-alpha01'
        // Rounded Image View
        implementation 'com.makeramen:roundedimageview:2.3.0'
    
    
        // fond carré arrondi page AjouterMission
        implementation 'androidx.cardview:cardview:1.0.0'
    
    
        // Boutons animés
        implementation 'com.airbnb.android:lottie:3.4.0'
    
        // Image Slider (intro)
        implementation 'com.synnapps:carouselview:0.1.5'
    
    }}
    
    dependencies {
        implementation 'androidx.appcompat:appcompat:1.3.1'
        implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
        implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
        implementation 'androidx.legacy:legacy-support-v4:1.0.0'
        implementation 'com.google.android.material:material:1.4.0'
        implementation 'androidx.annotation:annotation:1.2.0'
        implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
        implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
        implementation 'com.google.firebase:firebase-core:19.0.0'
        implementation 'com.google.firebase:firebase-storage:20.0.0'
        implementation 'com.google.firebase:firebase-firestore-ktx:23.0.3'
        implementation 'com.google.firebase:firebase-firestore:23.0.3'
        implementation 'com.google.firebase:firebase-database:20.0.1'
        implementation 'com.github.bumptech.glide:glide:4.12.0'
        implementation 'androidx.recyclerview:recyclerview:1.2.1'
        annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
        implementation 'de.hdodenhof:circleimageview:3.1.0'
        implementation 'com.squareup.picasso:picasso:2.71828'
        implementation 'com.theartofdev.edmodo:android-image-cropper:'
        implementation 'com.xwray:groupie:2.1.0'
    
    
    
        // Pour inclure un bottomsheet dans une vue
        implementation 'com.google.android.material:material:1.4.0'
        implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
        implementation 'androidx.fragment:fragment-ktx:1.3.6'
    
    
    
        // Retrofit
        implementation 'com.squareup.retrofit2:retrofit:2.4.0'
        implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
        implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
    
        //Rx
        implementation 'io.reactivex.rxjava2:rxjava:2.2.6'
        implementation 'com.jakewharton.rxrelay2:rxrelay:2.0.0'
        implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
    }
    
    apply plugin: 'com.google.gms.google-services'

谢谢各位!

biyesheng630 回答:Android Studio:评估项目“:app”时出现问题

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/628.html

大家都在问