Binoy Babu
Binoy Babu

Reputation: 17119

ABI specific android resource qualifier

I am planning to use python code in my app. So I have to ship python binaries along with the app. I was planning to store the apks in the raw resource directory.

However since the apk size would be huge if I include all abi binaries in a single apk, I would like to do an abi based split on my apk. To do that I need an ABI specific android resource qualifier. Is there anything like that? I couldn't find any.

Upvotes: 0

Views: 324

Answers (2)

Emmanuel
Emmanuel

Reputation: 1

Unfortunately, fake *.so libs under lib/ doesn't appear to work anymore. They aren't available in file system. /data/..../{app}/lib only contains real libraries. Something must have changed in the Android runtime.

Upvotes: 0

Alex Cohn
Alex Cohn

Reputation: 57173

PackagingOptions can be combined with ProductFlavors to achieve any level of flexibility, but this is not necessary to achieve your declared goal.

I invite you to use the trick that I proposed a while agp. The bottom line is that if you put the executables in the expected directories under jniLibs, and give them funny names that start with lib and end with .so, Android build tools will happily pack them into your APK, and the installer will happily prepare them to be used according to the ABI.

This way, you can use the full power of ABI-determined split, as well.

Upvotes: 2

Related Questions