A slightly larger project will use a third-party library, so there will inevitably be a different CPU architecture for the phone. So library files ' x86 ', ' x86_64 ', ' MIPS ', ' Mips64 ' Armeabi ', ' armeabi-v7a ', ' arm64-v8a ' But not all third-party libraries will adapt to all the CPU architecture, I have to test the use of a reduced performance and reduce the library file is only used armeabi-v7a library; armeabi-v7a The other is deleted, no armeabi-v7a, Move the Armeabi file to the armeabi-v7a and delete the rest. The following will tell you how to fit a specific CPU architecture library in the main module. Gradle plus ndk{}, the dependent module is also added
android{... defaultconfig { "XXXXXXX" 126 "1.2.6 " ndk { // Select the. So library for the corresponding CPU type to be added. // you can also add ' x86 ', ' x86_64 ', ' MIPS ', ' Mips64 ' // ' armeabi-v7a ', ' arm64-v8a ' modulename ' app ' }
Abifilters is the way to filter. So files, such as the above configuration will allow your project to package only Armeabi library files, other dependent module is also configured, the end result is that your app is only suitable for Armeabi CPU models; packaged APK file libs only Armeabi's so file;
Android Studio Specifies so library files that reference Jnilibs specific CPU architectures