Here is solution in my case.
- Open your flutter Project directory.
- Change directory to android directory in your flutter project directory
cd android - clean gradle
./gradlew clean - Build gradle
./gradlew buildor you can combine both commands with just./gradlew clean build - Now run your flutter project. If you use vscode, press F5. First time gradle running assembleDebug will take time.
PS: Delete gradle in case of all that steps don’t work