如何在Android Studio build时只build需要的CPU平台的部分

发布于 2022-09-07 20:05:00 字数 3003 浏览 19 评论 0

: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

我只需要apk在armeabi-v7a的平台上运行,但是每次生成apk的时候,共享库都要把所有平台的都编译一遍,十分浪费时间。如果实现只编译一个平台的版本的共享库?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

征棹 2022-09-14 20:05:00

Application.mk 文件指定 APP_ABI

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文