Flutter 颤振的build.gradle应用程序出错

Flutter 颤振的build.gradle应用程序出错,flutter,gradle,build.gradle,Flutter,Gradle,Build.gradle,我评论道: apply plugin: 'kotlin-android' androidExtensions{ experimental = true } 正如前一篇文章所建议的,关于相同的问题,但不管怎样,它仍然会返回此错误。这是我的身材。格雷德尔: def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localProper

我评论道:

apply plugin: 'kotlin-android'

androidExtensions{
    experimental = true
}
正如前一篇文章所建议的,关于相同的问题,但不管怎样,它仍然会返回此错误。这是我的身材。格雷德尔:

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
// apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"


android {
    compileSdkVersion 29

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.talk_app"
        minSdkVersion 23
        targetSdkVersion 29
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentalRunner "androidx.test.runner.AndroidUnitRunner"
        multiDexEnabled true
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
        }
    }
}

// androidExtensions{
//     experimental = true
// }

flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.google.firebase:firebase-analytics'
    implementation 'com.android.support:multidex:1.0.3'
}
apply plugin: 'com.google.gms.google-services'
以下是调试控制台上的错误:

FAILURE: Build failed with an exception.

* Where:
Build file 'E:\Work\Work\talk_app\android\app\build.gradle' line: 29

* What went wrong:
A problem occurred evaluating project ':app'.
> No signature of method: build_eo342ik7kf4kttl0as4y93aqc.android() is applicable for argument types: (build_eo342ik7kf4kttl0as4y93aqc$_run_closure2) values: [build_eo342ik7kf4kttl0as4y93aqc$_run_closure2@29804acb]
有人能就这个错误给出一些解决方案吗?很快找到解决这个错误的方法对我来说是非常有意义的

这是我的颤振版本:

Doctor summary (to see all details, run flutter doctor -v): 
[√] Flutter (Channel stable, 2.0.3, on Microsoft Windows [Version 10.0.19042.867], locale en-MY) 
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) 
[√] Chrome - develop for the web 
[√] Android Studio (version 4.1.0) 
[√] VS Code (version 1.55.0) 
[√] Connected device (3 available) –

哪个版本?请分享颤振医生输出这里是我的颤振医生输出@AVEbrahimi:doctor summary(要查看所有细节,请运行颤振医生-v):[√] 颤振(通道稳定,2.0.3,在Microsoft Windows[Version 10.0.19042.867]上,语言环境为我国版)[√] Android工具链-为Android设备开发(Android SDK版本30.0.3)[√] Chrome-为web开发[√] Android Studio(版本4.1.0)[√] VS代码(版本1.55.0)[√] 已连接设备(3个可用)