Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter: What is the difference between the apk/release directory and flutter-apk directory under build/app/outputs?

When I run flutter build apk --split-per-abi I get three apks twice: once under the directory build/app/outputs/apk/release and once under build/app/outputs/flutter-apk. What is the difference between these two directories?

like image 797
Norman Avatar asked Jul 15 '20 07:07

Norman


People also ask

What is the difference between app APK and app release APK?

Major differences are the debug apk and the release apk: For debug builds the apk will be signed with the default debug signing keys with debug flag enabled. For release apk you will have to explicitly specify the apk to sign with and the debug flag will be turned off so that it cannot be debugged.

How do I run the flutter app in release mode?

To compile in release mode, we just need to add the --release flag to the flutter run command and have a physical device connected. Although we can do so, we typically do not use the flutter run command with the --release flag.

What is a flutter build APK?

The fat apk that you are getting while using the flutter build apk contains the necessary compiled code to target all the Application Binary Interfaces or ABIs. Once a user downloads this fat apk, then only the code applicable to the device will be used. Show activity on this post.

How to split an APK file in flutter?

The command flutter build apk --split-per-abi typically generates two APK files. arm64 or x86_64 is the apk file for devices having 64-bit processors. x86 is the apk file for 32-bit processors. You can upload both of them on the PlayStore and based on the user's device architecture the corresponding apk will be installed.

What is an app bundle in flutter?

By default, the app bundle contains your Dart code and the Flutter runtime compiled for armeabi-v7a (ARM 32-bit), arm64-v8a (ARM 64-bit), and x86-64 (x86 64-bit). Show activity on this post. Remember that creating an App Bundle (an .aab file) is preferred over creating a fat APK or multiple APKs per abi.

How do I test an app using flutter?

During a typical development cycle, you test an app using flutter run at the command line, or by using the Run and Debug options in your IDE. By default, Flutter builds a debug version of your app. When you’re ready to prepare a release version of your app, for example to publish to the Google Play Store , this page can help.


1 Answers

They are the same. Old version of flutter use outputs/apk/release directory but they changed it to outputs/flutter-apk recently. The old directory is kept for compatibility with other building tools.

like image 71
Pegasis Avatar answered Nov 10 '22 05:11

Pegasis