0

I am developing apps flutter, but an error has been occurring in all my projects, even if I have just started, the error is already there, they do not affect the compilation but I'm afraid they are future problems! Can someone help me correct?

    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))
    }
CopsOnRoad
  • 237,138
  • 77
  • 654
  • 440
Will Lopes
  • 222
  • 1
  • 7

1 Answers1

0

These aren't the actual errors, currently you are opening these files in Flutter, so you see the error.

All you need to do is open build.gradle(app), and on top right corner of your IDE you should see something like:

enter image description here

Once you launch it in Android Studio as android module, you'll see errors are gone!

CopsOnRoad
  • 237,138
  • 77
  • 654
  • 440