Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update android export page for AAB requirement #9637

Merged
merged 2 commits into from
Nov 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update android export page for AAB requirement
  • Loading branch information
skyace65 committed Aug 16, 2024
commit 605491d801267ff60725fe894cb46a0cb23933f7
36 changes: 17 additions & 19 deletions tutorials/export/exporting_for_android.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,19 @@ This way, your application will look great on all Android devices and versions.
Exporting for Google Play Store
-------------------------------

Uploading an APK to Google's Play Store requires you to sign using a non-debug
keystore file; such file can be generated like this:
All new apps uploaded to Google Play after August 2021 must be an AAB (Android App Bundle)
file.

Uploading an AAB or APK to Google's Play Store requires you to sign using a non-debug
keystore file; such a file can be generated like this:

.. code-block:: shell

keytool -v -genkey -keystore mygame.keystore -alias mygame -keyalg RSA -validity 10000

This keystore and key are used to verify your developer identity, remember the password and keep it in a safe place!
It is suggested to use only upper and lowercase letters and numbers. Special characters may cause errors.
Use Google's Android Developer guides to learn more about `APK signing <https://developer.android.com/studio/publish/app-signing>`__.
Use Google's Android Developer guides to learn more about `app signing <https://developer.android.com/studio/publish/app-signing>`__.

Now fill in the following forms in your Android Export Presets:

Expand All @@ -137,22 +140,17 @@ Don't forget to uncheck the **Export With Debug** checkbox while exporting.

.. image:: img/export-with-debug-button.png

Optimizing the APK size
-----------------------

By default, the APK will contain native libraries for both ARMv7 and ARMv8
architectures. This increases its size significantly. To create a smaller APK,
uncheck either **Armeabi-v 7a** or **Arm 64 -v 8a** in your project's Android
export preset. This will create an APK that only contains a library for
a single architecture. Note that applications targeting ARMv7 can also run on
ARMv8 devices, but the opposite is not true.

Since August 2019, Google Play requires all applications to be available in
64-bit form. This means you cannot upload an APK that contains *just* an ARMv7
library. To solve this, you can upload several APKs to Google Play using its
`Multiple APK support <https://developer.android.com/google/play/publishing/multiple-apks>`__.
Each APK should target a single architecture; creating an APK for ARMv7
and ARMv8 is usually sufficient to cover most devices in use today.
Optimizing the file size
------------------------

If you're working with APKs an not AABs, By default, the APK will contain native
mhilbrunner marked this conversation as resolved.
Show resolved Hide resolved
libraries for both ARMv7 and ARMv8 architectures. This increases its size significantly.
To create a smaller file, uncheck either **Armeabi-v 7a** or **Arm 64 -v 8a** in
your project's Android export preset. This will create an APK that only contains
a library for a single architecture. Note that applications targeting ARMv7 can
also run on ARMv8 devices, but the opposite is not true. The reason you don't do
this to save space with AABs is that google automatically splits up the AAB on their
mhilbrunner marked this conversation as resolved.
Show resolved Hide resolved
backend, so the user only downloads what they need.

You can optimize the size further by compiling an Android export template with
only the features you need. See :ref:`doc_optimizing_for_size` for more
Expand Down