How to compile android for different architectures? Apk working on ARMv6 and or ARMv7

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Freeman
:warning: Old Version Published before Godot 3 was released.
:bust_in_silhouette: Reply From: Freeman

As RandomShader stated on Github some time ago:

First check http://docs.godotengine.org/en/latest/reference/compiling_for_android.html
In order to build for ARMv6, invoke SCons accordingly: scons platform=android target=release android_arch=armv6 and/or scons platform=android target=debug android_arch=armv6.

That will add the ARMv6 libraries to platform/android/java/libs/ so the next invocation of Gradle will put them inside the APKs.

In fact you don’t even need to build the ARMv7 variants at all and if you don’t need them, you can remove the armeabi-v7a directories and invoke Gradle again so your APKs get smaller.