I have created a flutter project in Android Studio. The project was working fine until I open the app level gradle file as when i open is starts showing two errors 1) 'Cannot resolve symbol Properties' and 2) 'cannot resolve symbol GradleException' i click on "Open for editing in Android studio" and the error 1) disappeared butt 'cannot resolve symbol GradleException' is still there I have latest Gradle and Android Studio the project was working fine until I open this app level Gradle file.
Set Project SDK to Android API Platform version 29 (or the latest version, 30), like so:
defaultConfig {
...
minSdkVersion 16
targetSdkVersion 30
}
and update GradleException()
to FileNotFoundException()
Please follow it: https://github.com/flutter/flutter/issues/29608#issuecomment-548649907
This works for me, Thanks
throw GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
I tried by removing "new" keyword and it somehow worked for me.
Changed
throw new GradleException
to
throw GradleException.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With