0

I am integrating a third party API into an Android application and must include their NDK libraries. I am using Android Studio w/gradle and putting all native libraries under:

src/main/jniLibs/

My question is this: they have provided '.so' libraries under the subdirectories:

armeabi/ mips/ x86/

Do I need to include all of these directories under jniLibs in my app?

The implementation instructions specified only 'armeabi', but then I am not sure why the other architectures are provided. The mips directory is about 3.2 MB and the x86 directory is about 6MB, so I do not want to package these in my app if not necessary. Not sure what they are for.

JohnRock
  • 6,795
  • 15
  • 52
  • 61

1 Answers1

3

MIPS-powered devices take a relatively small market share these days, and this is the low-end (primarily in terms of retail price) segment of the market. Your app may be exactly fit for this niche, or you may not be interested to pursue this opportunity (note that marketing approach and even technical challenges are significantly different for the top-end and low-end targets).

On the other end, all Intel-based devices I saw, have decent ARM emulation built-in, exactly for the purpose to compensate for poor coverage of this platform by developers of native apps. So, if you are not concerned with the performance, you can painlessly drop the x86 support.

Actually, it might be more important to provide armv7-a version of your native libs, because use of advanced instruction set (especially with NEON) may boost performance of your app for a vast majority of users (most of the modern tablets and phone these days come with one of the chipsets that support these).

Furthermore, in less than a month, new ABIs will enter the market: 64-bit Intel and ARM devices, e.g. Nexus 6, running Android 5.0 Lollipop.

But ultimately, your primary concern probably is that the size of APK file that millions of your users will be downloading from the Play Store will be unnecessarily huge. To resolve this, there is a different technique, which allows you to split your APK and upload to Play Store separate versions, one for each ABI. The trick is that the version numbers should be managed carefully, to allow smooth upgrades for users of each platform. Here yours truly proposed (and Ashwin S Ashok improved) a version numbering scheme that helps manage this task.

Community
  • 1
  • 1
Alex Cohn
  • 56,089
  • 9
  • 113
  • 307