Home » Android » android – How can i fix my flutter build.gradle cannot resolve symbol error?-Exceptionshub

android – How can i fix my flutter build.gradle cannot resolve symbol error?-Exceptionshub

Posted by: admin February 26, 2020 Leave a comment

Questions:

I tried upgrading both my flutter and Dart SDK.
I tried also switching the IDE, but nothing changed.
What shall i do?

enter image description here

How to&Answers:

You can try two things:

1 – Update tools.build:gradle
Go to android/build.gradle and try replace ext.kotlin_version and dependencies with these values:

 buildscript {
    ext.kotlin_version = '1.3.50'
    ...

    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
        ...
    }
}

2 – Set ANDROID_HOME environment to your Android SDK location (commonly C:\Users{YOUR_USER}\AppData\Local\Android\Sdk)

If doesn’t help, please, post your fully exception in the question