How to build only the part of the CPU platform needed in Android Studio build

:app:preparePdRobotLiteMobileAPIUnspecifiedLibrary    29ms
:app:preparePdRobotLiteRecyclelibraryUnspecifiedLibrary    32ms
:app:preparePdRobotLiteUsbseriallibUnspecifiedLibrary    163ms
:app:preparePuduBotCDebugDependencies    1ms
:app:compileMyDemoArm64-v8aDebugSharedLibraryMyDemoArm64-v8aDebugSharedLibraryMainC    340ms
:app:compileMyDemoArm64-v8aDebugSharedLibraryMyDemoArm64-v8aDebugSharedLibraryMainCpp    16s 521ms
:app:linkMyDemoArm64-v8aDebugSharedLibrary    668ms
:app:MyDemoArm64-v8aDebugSharedLibrary    
:app:stripSymbolsArm64-v8aDebugSharedLibrary    104ms
:app:ndkBuildArm64-v8aDebugSharedLibrary    1ms
:app:ndkBuildArm64-v8aDebugStaticLibrary    
:app:compileMyDemoArmeabi-v7aDebugSharedLibraryMyDemoArmeabi-v7aDebugSharedLibraryMainC    335ms
:app:compileMyDemoArmeabi-v7aDebugSharedLibraryMyDemoArmeabi-v7aDebugSharedLibraryMainCpp    13s 811ms
:app:linkMyDemoArmeabi-v7aDebugSharedLibrary    545ms
:app:MyDemoArmeabi-v7aDebugSharedLibrary    1ms
:app:stripSymbolsArmeabi-v7aDebugSharedLibrary    86ms
:app:ndkBuildArmeabi-v7aDebugSharedLibrary    
:app:ndkBuildArmeabi-v7aDebugStaticLibrary    1ms
:app:compileMyDemoArmeabiDebugSharedLibraryMyDemoArmeabiDebugSharedLibraryMainC    193ms
:app:compileMyDemoArmeabiDebugSharedLibraryMyDemoArmeabiDebugSharedLibraryMainCpp    13s 485ms
:app:linkMyDemoArmeabiDebugSharedLibrary    540ms
:app:MyDemoArmeabiDebugSharedLibrary    1ms
:app:stripSymbolsArmeabiDebugSharedLibrary    90ms
:app:ndkBuildArmeabiDebugSharedLibrary    
:app:ndkBuildArmeabiDebugStaticLibrary    
:app:compileMyDemoMips64DebugSharedLibraryMyDemoMips64DebugSharedLibraryMainC    300ms
:app:compileMyDemoMips64DebugSharedLibraryMyDemoMips64DebugSharedLibraryMainCpp    17s 576ms
:app:linkMyDemoMips64DebugSharedLibrary    869ms
:app:MyDemoMips64DebugSharedLibrary    
:app:stripSymbolsMips64DebugSharedLibrary    112ms
:app:ndkBuildMips64DebugSharedLibrary    1ms
:app:ndkBuildMips64DebugStaticLibrary    
:app:compileMyDemoMipsDebugSharedLibraryMyDemoMipsDebugSharedLibraryMainC    329ms
:app:compileMyDemoMipsDebugSharedLibraryMyDemoMipsDebugSharedLibraryMainCpp    16s 769ms
:app:linkMyDemoMipsDebugSharedLibrary    676ms
:app:MyDemoMipsDebugSharedLibrary    
:app:stripSymbolsMipsDebugSharedLibrary    89ms
:app:ndkBuildMipsDebugSharedLibrary    1ms
:app:ndkBuildMipsDebugStaticLibrary    
:app:compileMyDemoX86DebugSharedLibraryMyDemoX86DebugSharedLibraryMainC    295ms
:app:compileMyDemoX86DebugSharedLibraryMyDemoX86DebugSharedLibraryMainCpp    13s 701ms
:app:linkMyDemoX86DebugSharedLibrary    503ms
:app:MyDemoX86DebugSharedLibrary    1ms
:app:stripSymbolsX86DebugSharedLibrary    90ms
:app:ndkBuildX86DebugSharedLibrary    
:app:ndkBuildX86DebugStaticLibrary    
:app:compileMyDemoX86_64DebugSharedLibraryMyDemoX86_64DebugSharedLibraryMainC    309ms
:app:compileMyDemoX86_64DebugSharedLibraryMyDemoX86_64DebugSharedLibraryMainCpp    14s 691ms

I only need apk to run on armeabi-v7a platforms, but every time I generate apk, the shared library compiles all platforms, which is a waste of time. What if you implement a shared library that compiles only one version of the platform?


Application.mk file specifies APP_ABI

Menu