From what I understand, native code on Android is code that works directly with the processor of a specific device. So if I wanted to take advantage of a certain processor I would use native code.
But what happens if I want to make an app that contains native code, but targets multiple processors?
Do I have to make multiple apps, one for each architecture? Or is there a way to put multiple version of the native code in one app picking the one matching the processor of the device it runs on?
The Android Native Development Kit is a suite of cross compilers and support libraries which can be used to produce shared object (.so) files targeting one or more of the officially supported Android architectures.
The Android application package (.apk) specialized zip file format allows inclusion of distinct native libraries for more than one architecture.
If you refer to the NDK documentation, you will see that there is a project configuration file which you can use to specify which architecture(s) your native code should be compiled to support.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With