Flutter: Upgrade the version code for Google Play store

By Qiaqia Li

Updated 2019-04-19

Share:

When I upgrade my Flutter APP, I met a problem that the version code always be 1, even though I modified all related configuration. I had repeatedly confirmed whether my configuration of version code is wrong, and I pretty sure that they are exactly correct. I was so confused and frustrated.

I looked up related solutions on stackoverflow, and they told me to modified the configuration, those answers were useless to me. Then I saw someone suggesting to clean up the cache of Flutter by executing flutter clean in the terminal, and finally it worked! The version code of new apk upgraded to 2! If you also met this problem, make sure your configuration is correct and execute the command flutter clean, then execute flutter build apk, check your output.json, the version code should be new number.