Suraj Jha
Suraj Jha

Reputation: 209

In flutter my build apk file is not working properly

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

Upvotes: 2

Views: 2067

Answers (4)

crookshanksacademy.com
crookshanksacademy.com

Reputation: 574

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.

Upvotes: 0

Johny Saini
Johny Saini

Reputation: 909

Do the following steps may be helpful for you

  1. Open android studio do "Invalid Caches/Restart" from the menu bar
  2. flutter clean and try to make a build from android studio

Upvotes: 0

Amon C
Amon C

Reputation: 1808

Do following:

  • flutter clean
  • Check version number and name in the pubspec.yaml
  • Open the Android part in Android Studio, try to build from there

Upvotes: 0

Ayren King
Ayren King

Reputation: 427

If you are using Android Studio, I would recommend building the apk through the IDE.

On the top menu bar of Android Studio, select 'Build', 'Flutter', then 'Build APK'.

I haven't had any issues when building an app this way.

Upvotes: 0

Related Questions