Upgrading Flutter version in your App, you probably face this issue when compiling to Android.
annotationType(): unrecognized Attribute name MODULE (class com.sun.tools.javac.util.UnsharedNameTable$NameImpl)
This is easily fixable:
Check the build.gradle under android folder.
Find this line in it:
classpath 'com.android.tools.build:gradle:3.*
Probably you will see a version 3.* since the project was created with and old Flutter version.
Change the gradle version to:
classpath 'com.android.tools.build:gradle:4.1.0'
And that is it!
Let us know if this worked for you!