ERROR: no signature of method build_2vweuamtxv88l81g8bi0oprhj.android() is applicable for argument types: (build_2vweuamtxv88l81g8bi0oprhj_run_cl...
So I'm working on a Flutter project for a company and on the journey from idea to product, I've encountered some pretty uncommon problems. I've decided to document quick fixes to these problems to help developers who may face them later.
The error message in the title of this article was coughed up by VScode and Android studio after I added firebase dependencies to the build.gradle(app) file in the android module of my Flutter app. I searched for a fix everywhere I knew and every single day for 4days. Not even the Flutter's GitHub issues could help.
Eventually I found the fix and it was so simple, I would've beaten myself up if I wasn't so relieved. Now let's get down to it:
Android Studio versions 4.0 and above are riddled with bugs and for some reason, recent Gradle and Gradle plugin versions are bug infested too. A lot of code that used to compile on older versions of android studio using older versions of Gradle and Gradle plugins doesn't compile anymore and those dependencies I added just happened to be affected by that new issue.
All I did to fix this problem was reduce my Gradle version to 3.6.3 and my Gradle plugin version to 5.4.2 and it worked.
Turns out it was an Android error, not a Flutter error and it had a very easy fix all along.
I hope this helps.