Build Godot Android package from source

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By bashan

I wasted many hours on this. Not sure why is keeps refusing to work. I would like to build Godot Android release and debug packages from Godot source as a first step before building a custom package containing FaceBook module (I just want first to make sure it works OK).
I am doing the following steps as explained in the docs (using Windows):

scons platform=android target=release android_arch=armv7
scons platform=android target=release android_arch=arm64v8
scons platform=android target=release android_arch=x86
cd platform/android/java
# On Windows
.\gradlew generateGodotTemplates
# On Linux and macOS
./gradlew generateGodotTemplates

It generated the packages in the bin directory, but they simply doesn’t work and the app crashed. Every time it is something else. At first the screen flickered when the app started and crashed the app. Then the app crashed right away even without showing Godot’s logo.
I am using latest Godot available on scoop.
I am cloning the latest master branch.
Anything I am missing?

Tried running on emulator device, the app is not even installed and I am getting this error on the console:

Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]