Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android NDK : what should I set in Application.mk for APP_ABI?

I am wondering which architectures I should put in the Application.mk file of my Android game.

I want to support all possible platforms that can download games on Google Play and other kinds of Android stores.

I would say that I should set:

APP_ABI := armeabi x86 (as many x86 devices are coming soon as far as I know)

But I wonder if I should not set:

APP_ABI := armeabi armeabi-v7a x86

or

APP_ABI := all

Please clarify.

like image 669
Regis_AG Avatar asked Oct 18 '13 10:10

Regis_AG


People also ask

Where do I put Android MK?

The Android.mk file resides in a subdirectory of your project's jni/ directory, and describes your sources and shared libraries to the build system. It is really a tiny GNU makefile fragment that the build system parses once or more.

What is arm64 v8a abi?

arm64-v8a. This ABI is for ARMv8-A based CPUs, which support the 64-bit AArch64 architecture. It includes the Advanced SIMD (Neon) architecture extensions. You can use Neon intrinsics in C and C++ code to take advantage of the Advanced SIMD extension.

What is the Android NDK How can one use it why should one use it?

The Native Development Kit (NDK) is a set of tools that allows you to use C and C++ code with Android, and provides platform libraries you can use to manage native activities and access physical device components, such as sensors and touch input.


1 Answers

You can also specify mips, which would be included when you use all.

armeabi code can run on armeabi-v7a devices, but not the other way around. So you don't need armeabi-v7a if you have armeabi, but it will allow you take advantage of hardware floating point operations on some devices.

Also note that the more architectures you include, the larger your resulting APK will be. And if you are regularly compiling for all platforms, your builds will take longer.

Take a look at docs/CPU-ARCH-ABIS.html in your NDK installation for more information about the different architectures.

like image 193
krsteeve Avatar answered Sep 30 '22 15:09

krsteeve