简体   繁体   中英

Flutter GradleException error after changing minSdkVersion

so I just changed some settings in my flutter build.gradle project and I changed the minSdkVersion from 16 to 19 since this was required to use a widget (WebView to be exact). However, since changing this, the error shown below occurs

GradleExecption 错误

Its weird since I can still run the program just fine and I can even comment and hide the code and it will run fine, buts its just really annoying having red lines in my project...

and yes flutter.sdk is already defined in my local.properties file

在此处输入图像描述

So can anyone help me?

I had a very similar problem earlier and solved this by changing 'GradleException' to 'FileNotFoundException.'

It worked for me, so hopefully it helps, good luck!

PS. I could not find out technically why this worked!

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM