Cannot Resolve Symbol 'Properties' on Android Studio

2,658

Set Project SDK to Android API Platform version 29 (or the latest version, 30), like so:

Step 1:

defaultConfig {
    ...
    minSdkVersion 16
    targetSdkVersion 30
}

Step 2:

update GradleException() to FileNotFoundException()

Step 3:

Please follow this: https://github.com/flutter/flutter/issues/29608#issuecomment-548649907

Share:
2,658
김동구
Author by

김동구

Updated on December 24, 2022

Comments

  • 김동구
    김동구 over 1 year

    There are two errors in my Android Studio right now. In the app level build.gradle folder, the line

    def localProperties = new Properties()
    

    shows error Cannot Resolve Symbol 'Properties' and on

    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.")
    }
    

    it says Cannot Resolve Symbol GradleException, What should I do to solve these two errors?

    • Saiful Islam
      Saiful Islam over 3 years
      is there any problem while running the application? I had same error in gradle file but its never causes any effect on my application while i am running it.