Android studio 运行Flatter应用程序时android studio中出现gradle错误

Android studio 运行Flatter应用程序时android studio中出现gradle错误,android-studio,flutter,gradle,build.gradle,flutter-dependencies,Android Studio,Flutter,Gradle,Build.gradle,Flutter Dependencies,我正在尝试使用firebase验证我的登录页面活动。所以,在这样做的时候,我得到了这个Gradle错误 我参考了下面的链接,但没有任何东西适合我 在project/android/app/build.Gradle中,GradleException以红色突出显示 build.gradle文件: buildscript { ext.kotlin_version = '1.3.50' repositories { google() jcente

我正在尝试使用firebase验证我的登录页面活动。所以,在这样做的时候,我得到了这个Gradle错误

我参考了下面的链接,但没有任何东西适合我

在project/android/app/build.Gradle中,GradleException以红色突出显示

build.gradle文件:

    buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.google.gms:google-services:4.3.3'
        classpath 'com.android.tools.build:gradle:4.0.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

    allprojects {
        repositories {
            google()
            jcenter()
        }
    }

    rootProject.buildDir = '../build'
    subprojects {
        project.buildDir = "${rootProject.buildDir}/${project.name}"
    }
    subprojects {
        project.evaluationDependsOn(':app')
    }

    task clean(type: Delete) {
        delete rootProject.buildDir
    }
在控制台中,错误为:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
> No version of NDK matched the requested version 21.0.6113669. Versions available locally: 20.1.5948944

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 40s
Exception: Gradle task assembleDebug failed with exit code 1

帮我解决这个问题

您必须通过项目设置->SDK位置->Android NDK位置来配置NDK


如果您没有NDK,则需要转到工具->SDK管理器->SDK工具选项卡,然后选择NDK(并排)并安装它。

这是否回答了您的问题?对但是那里提供的解决方案对我不起作用