Errors in build.gradle in Flutter application: Cannot resolve symbol "Properties" and Cannot resolve symbol "GradleException"
If you are developing Flutter application using Android studio maybe you have seen this errors in build.gradle:
- Cannot resolve symbol 'Properties'
- Cannot resolve symbol 'GradleException'
You can just choose to ignore this error, it will not cause any problems. Or if it is too annoying, you can checkout the following solution.
Go in File -> Project Structure -> Project Settings -> Project and set Project SDK to Android API 30 Platform (or the latest).
Go in File -> Project Structure -> Project Settings -> Modules and select the Dependencies tab and choose Android API 30 Platform in the Module SDK dropdown.
Change GradleException() to FileNotFoundException() because it's not supported in the Java version of Android API 30
And the problem is solved.