使用不同的ndk.abifilters库比主应用程序进行编译

发布于 2025-02-13 19:53:08 字数 326 浏览 0 评论 0原文

是否可以使用使用库.So文件来编译主应用程序

ndk { abiFilters "armeabi-v7a", "arm64-v8a" }

并使用

ndk { abiFilters "arm64-v8a"}

库64-V8A编译? 我在另一个模块中使用“ ArmeAbi-V7a”中有其他库,因此对于每个CPU,仅其所需的库。

Library .gradle总是被忽略,并编译应用程序,然后是ARM64-V8A和ARMEABI-V7A的库模块,我不需要,它们的尺寸为20MB,

谢谢!

Is it possible to compile main app with

ndk { abiFilters "armeabi-v7a", "arm64-v8a" }

And Library module with

ndk { abiFilters "arm64-v8a"}

So that Library .so files only get compiled for arm64-v8a?
I have some other libraries in another module with "armeabi-v7a" so for each cpu only that libraries that it needs.

Library .gradle is always ignored and app compiles then Library modules for arm64-v8a and also armeabi-v7a which I don't need and they take 20mb of size

Thank you!

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

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

发布评论

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

评论(1

夜巴黎 2025-02-20 19:53:09

所以我有点解决了这个问题。

我所做的是将所有文件直接排除在build.gradle中

packagingOptions {
    exclude '/lib/armeabi-v7a/first.so'
    exclude '/lib/armeabi-v7a/second.so'
    ...
}

,现在它在构建后删除了此文件

So I kinda solved this.

What I did is excluded all files directly in build.gradle

packagingOptions {
    exclude '/lib/armeabi-v7a/first.so'
    exclude '/lib/armeabi-v7a/second.so'
    ...
}

And now it removes this files after building

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