In flutter my build apk file is not working properly
Although this method is a bit vague and old fashioned, but it still works.
Step One: Run your android device as a virtual emulator.
Step Two: Run main.dart in your android device. This will install the app in your device.
Step Three: Go to Play Store and install this app called APK Extractor.
Step Four: Extract your APK from the app.
The APKs created through this are smaller and more efficient as compared to the ones created using Android Studio and work pretty well.

Suraj Jha
Currently working on a project Rapport. Checkout our website for more details.
Updated on December 22, 2022Comments
-
Suraj Jha 29 minutes
I have read all the available solutions on this topic none of them worked for me.I have deleted all build file using flutter clean and also uninstalled the app from the phone before every run The apk file built using flutter run --release works fine. The apk file built using flutter build apk doesn't working properly. I don't know why it is happening?
My problem is similar to Android Studio generating old version APK
-
Suraj Jha over 2 yearsAnd also file size get increased in flutter build apk and I have also tried flutter build apk --release
-
Claudio Redi over 2 yearsWhat's the error?
-
Suraj Jha over 2 yearsI have added onboarding screen for new user + after login it should check whether the data is available in firebase or not. But in case of flutter build apk it is directly navigating to login screen.It is building the apk for older version code.
-
Suraj Jha over 2 years@ClaudioRedi But It is working fine when I build my apk using flutter run --release. I like to know why it is happening
-
Lukas over 2 yearsYou need to provide us the error message if you run "flutter build apk" in the project directory. Does "flutter doctor -v" print errors?
-
Suraj Jha over 2 years@Lukas There is no error message.After I install that apk it works like previous version of that app
-
Suraj Jha over 2 yearsNo @Lukas it is not showing any error
-
Suraj Jha over 2 yearsMy problem is similar to stackoverflow.com/q/59176581/13512631 @ClaudioRedi
-
Shakti S.P. Swain over 2 years@SurajJha Please run the below commands in terminal, I think there might be issue of cache. > flutter clean > rm -rf pubspec.lock .packages .flutter-plugins > flutter pub pub cache repair > flutter packages get
-
-
Suraj Jha over 2 yearsIt's my first time I have experienced this.I have tried that too but it also doesn't worked
-
Suraj Jha over 2 yearsI have two laptop in both I'm facing same problem. Even my friend is facing the same problem
-
Ayren King over 2 yearsTry running flutter doctor in the command line to see if there is any issues with the framework or if there are any android licenses that haven't been accepted.
-
Suraj Jha over 2 yearsMy problem is similar to stackoverflow.com/q/59176581/13512631