I followed the steps in the Flutter document and tried to build my first Flutter app in Intellij IDEA. And when I try to run it,there was an error about my JAVA_HOME variabl
For me just deleting new before Properties and GradleException it have solved it.
• Flutter version 1.21.0-10.0.pre.55 | Master Channel |
• Dart version 2.10.0 (build 2.10.0-11.0.dev)
• Android Studio 4.0.1
here is first lines in build.gradle 'contains changes'
def localProperties = 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 GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
. . . . . . . .