Using armeabi and armeabi-v7a libraries with APK splitting

I'm using the new APK splits feature for the 0.13 Android plugin and I've managed to halve the size of my most build scripts and speed up builds by 4x. My application has libraries of libraries for each platform over 20MB in size, and priority is with small APK size. Prior to 0.13, we had several scripts that dynamically put the .so files on the right lines (depending on which platform we were building on) and did a full build. This worked fine, but was terribly slow and due to a bad mix of gradle and non-gradle scripts.

The latest APK splits function solved most of my problems, but I still have a problem with the armeabi-v7a libraries. It looks like when gradle creates armeabi-v7a flavor, it looks for libraries defined in / libs / armeabi -v7a folder and ignores libraries that were compiled for armeabi but not armeabi-v7a.

For example, this is one of my applications:

App1/
 - libs
  - armeabi
    - lib1.so
    - lib2.so
    - lib3.so
  - armeabi-v7a
    - lib3.so
  - x86
    - lib1.so
    - lib2.so
    - lib3.so

      

When I compile it for armeabi-v7a then gradle includes armeabi-v7a / lib3.so but not armeabi / lib1.so and armeabi / lib2.so. At runtime, the APK doesn't work (obviously) because it can't find lib1.so and lib2.so.

Is there a way to tell gradle to add libraries that are in armeabi / but not in armeabi-v7a / in armeabi-v7a APKs?

+3


source to share


1 answer


I opened a b.android.com issue (see https://code.google.com/p/android/issues/detail?id=77490 ) and it's a known limitation in 0.13+. Hopefully this will be fixed soon.



0


source







All Articles