在android/app/build.gradle - 出现以下错误:出现以下错误,出现以下错误,出现以下错误!怎么修?

In android/app/build.gradle - following errors occur: following errors occur, following errors occur, following errors occur! How to fix?

我正在开发应用flutter,但是我所有的项目都出现了错误,即使我刚刚开始,错误已经存在,它们不影响编译但我担心它们是未来的问题! 有人可以帮我改正吗?

    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')
   flutterVersionCode = '3001'


    def flutterVersionName = localProperties.getProperty('flutter.versionName')
    flutterVersionName = '0.0.3'


    def keystoreProperties = new **Properties**()
    def keystorePropertiesFile = rootProject.file('key.properties')
     if (keystorePropertiesFile.exists()) {
       keystoreProperties.load(new **FileInputStream**(keystorePropertiesFile))
    }

这些不是真正的错误,当前您正在 Flutter 中打开这些文件,因此您会看到错误。

您需要做的就是打开 build.gradle(app),然后在 IDE 的右上角您应该会看到如下内容:

在 Android Studio 中将其作为 android 模块启动后,您会看到错误消失了!