To develop Flutter apps for iOS, you need a Mac with Xcode 9.0 or newer: Install Xcode 9.0 or newer (via web download or the Mac App Store ). Configure the Xcode command-line tools to use the newly-installed version of Xcode by running the following from the command line.
During a typical development cycle,you test an app using
flutter run at the command line,or by using the Run and Debugoptions 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. Before publishing,you might want to put some finishing touches on your app.This page covers the following topics:
Adding a launcher icon
When a new Flutter app is created, it has a default launcher icon.To customize this icon, you might want to check out theflutter_launcher_icons package.
Alternatively, you can do it manually using the following steps:
Signing the app
To publish on the Play Store, you need to give your app a digitalsignature. Use the following instructions to sign your app.
Create a keystore
If you have an existing keystore, skip to the next step.If not, create one by running the following at the command line:
On Mac/Linux, use the following command:
On Windows, use the following command:
This command stores the
key.jks file in your homedirectory. If you want to store it elsewhere, changethe argument you pass to the -keystore parameter.However, keep the keystore file private;don’t check it into public source control!
Note:
Reference the keystore from the app
Create a file named
<app dir>/android/key.properties that contains a reference to your keystore:
Warning: Keep the
key.properties file private; don’t check it into public source control.
Configure signing in gradle
Configure signing for your app by editing the
<app dir>/android/app/build.gradle file.
Release builds of your app will now be signed automatically.
Note: You may need to run
flutter clean after changing the gradle file. This prevents cached builds from affecting the signing process.
For more information on signing your app, seeSign your app on developer.android.com.
Shrinking your code with R8
R8 is the new code shrinker from Google, and it’s enabled by defaultwhen you build a release APK or AAB. To disable R8, pass the
--no-shrink flag to flutter build apk or flutter build appbundle .
Note: Obfuscation and minification can considerably extend compile time of the Android application.
Reviewing the app manifest
Review the default App Manifest file,
AndroidManifest.xml ,located in <app dir>/android/app/src/main and verify that the valuesare correct, especially the following: Samsung kies air download mac.
Reviewing the build configuration
Review the default Gradle build file file,
build.gradle , located in <app dir>/android/app andverify the values are correct, especially the followingvalues in the defaultConfig block:
Building the app for release
You have two possible release formats when publishing tothe Play Store.
Note: The Google Play Store prefers the app bundle format. Download photoshop cs6 portable mac. For more information, see Android App Bundle and About Android App Bundles.
Warning: Recently, the Flutter team has received several reports from developers indicating they are experiencing app crashes on certain devices on Android 6.0. If you are targeting Android 6.0, use the following steps:
For more information, see the public issue.
Build an app bundle
This section describes how to build a release app bundle.If you completed the signing steps,the app bundle will be signed.At this point, you might consider obfuscating your Dart codeto make it more difficult to reverse engineer. Obfuscatingyour code involves adding a couple flags to your build command,and maintaining additional files to de-obfuscate stack traces.
From the command line:
The release bundle for your app is created at
<app dir>/build/app/outputs/bundle/release/app.aab .
By default, the app bundle contains your Dart code and the Flutterruntime compiled for armeabi-v7a (ARM 32-bit), arm64-v8a(ARM 64-bit), and x86-64 (x86 64-bit).
Test the app bundle
An app bundle can be tested in multiple ways—this sectiondescribes two.
![]() Offline using the bundle tool
Online using Google Play
Build an APK
Although app bundles are preferred over APKs, there are storesthat don’t yet support app bundles. In this case, build a releaseAPK for each target ABI (Application Binary Interface).
If you completed the signing steps,the APK will be signed.At this point, you might consider obfuscating your Dart codeto make it more difficult to reverse engineer. Obfuscatingyour code involves adding a couple flags to your build command.
From the command line:
This command results in three APK files:
Removing the
--split-per-abi flag results in a fat APK that containsyour code compiled for all the target ABIs. Such APKs are larger insize than their split counterparts, causing the user to downloadnative binaries that are not applicable to their device’s architecture.
Install an APK on a device
Follow these steps to install the APK on a connected Android device.
From the command line:
Publishing to the Google Play Store
For detailed instructions on publishing your app to the Google Play Store,see the Google Play launch documentation.
Updating the app’s version number
The default version number of the app is
1.0.0 .To update it, navigate to the pubspec.yaml fileand update the following line:
version: 1.0.0+1
The version number is three numbers separated by dots,such as
1.0.0 in the example above, followed by an optionalbuild number such as 1 in the example above, separated by a + .
Both the version and the build number may be overridden in Flutter’sbuild by specifying
--build-name and --build-number , respectively.
In Android,
build-name is used as versionName whilebuild-number used as versionCode . Buying ram for mac. For more information,see Version your app in the Android documentation.
After updating the version number in the pubspec file,run
flutter pub get from the top of the project, oruse the Pub get button in your IDE. This updatesthe versionName and versionCode in the local.properties file,which are later updated in the build.gradle file when yourebuild the Flutter app.
Android release FAQ
Here are some commonly asked questions about deployment forAndroid apps.
When should I build app bundles versus APKs?Can I Release Flutter App On Ios Without Mac Os
The Google Play Store recommends that you deploy app bundlesover APKs because they allow a more efficient delivery of theapplication to your users. However, if you’re distributingyour application by means other than the Play Store,an APK may be your only option.
What is a fat APK?
A fat APK is a single APK that contains binaries for multipleABIs embedded within it. This has the benefit that the single APKruns on multiple architectures and thus has wider compatibility,but it has the drawback that its file size is much larger,causing users to download and store more bytes when installingyour application. When building APKs instead of app bundles,it is strongly recommended to build split APKs,as described in build an APK using the
--split-per-abi flag.
What are the supported target architectures?
When building your application in release mode,Flutter apps can be compiled for armeabi-v7a (ARM 32-bit),arm64-v8a (ARM 64-bit), and x86-64 (x86 64-bit).Flutter does not currently support building for x86 Android(See Issue 9253). Mac write on pdf app.
How do I sign the app bundle created by
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |