flutter_flavorizr icon indicating copy to clipboard operation
flutter_flavorizr copied to clipboard

Suddenly Flavor not working in android build bundle

Open kareemzok opened this issue 3 years ago • 6 comments

Hello, Suddenly when I build the app to generate the bundle package for google play store doesnt seams to take effect it doesnt runthe app as per the flavor while it was working. However on emulator from androud studio when we run based on the flaver main file it working.

Please advice why its not working

kareemzok avatar Jun 30 '22 21:06 kareemzok

Hello @kareemzok , can you provide the instructions you are using to compile the aab bundle?

AngeloAvv avatar Jul 08 '22 07:07 AngeloAvv

Hello,

I just noticed you replied me. We are just trying to generate a built aab for the app and its taking the main file by default and not the light flavor one. To have a work arround we added a variable to define light flavor in the main.dart.

We followed your tutorial and steps and suddenly not taking the flavor when generating the built but when running the app using emulator it works

kareemzok avatar Aug 14 '22 22:08 kareemzok

Hello @kareemzok , can you provide the instructions you are using to compile the aab bundle?

Still a valid question :)

AngeloAvv avatar Aug 15 '22 05:08 AngeloAvv

Hello @kareemzok , can you provide the instructions you are using to compile the aab bundle?

Still a valid question :)

Hehehe you mean generate the bundle? well, we follow the steps below

  1. Get pub ( if needed )
  2. Flutter clean ( if needed )
  3. Run app on emulator
  4. Right click on project root > click on flutter > open in module
  5. New android studio open to compile the project
  6. Then we proceed the normal way when we want to generate the bundle by selecting the key and then the flavor on last step
  7. Wait few minutes and the bundle is generated

If you mean something else by compile, please elaborate more

kareemzok avatar Aug 15 '22 07:08 kareemzok

Can you try using a manual approach, in particular by building your artifact using: flutter build appbundle --flavor apple -t lib/main-apple.dart --release

and then by signing the generated bundle manually?

AngeloAvv avatar Aug 15 '22 14:08 AngeloAvv

Hello @AngeloAvv , Will try that and let you know soon

kareemzok avatar Aug 15 '22 14:08 kareemzok

Hello, Sorry i haven't reply but i was very busy and dont wanna mess with the app as its for a client and we keep updating it. Please lets keep it open to check

kareemzok avatar Sep 30 '22 10:09 kareemzok

Hey @kareemzok , any updates on this?

AngeloAvv avatar Feb 25 '23 20:02 AngeloAvv

Hllo @AngeloAvv ,

Sorry for not replying back but I wasn't able to try it. We will try it on the next update of the app as we are adding translation to it and will be pushed soon

kareemzok avatar Feb 25 '23 21:02 kareemzok