apk中的android资源

发布于 2024-08-29 08:43:08 字数 213 浏览 2 评论 0原文

在我的 android 开发项目中,res 文件夹下包含我的应用程序使用的所有资源。大小为 3.11 mb,包含 1013 个文件。另一方面,在 apk 中有一个文件夹 res,其中包含所有资源,但它的大小只有 760 kb,并且只包含 332 个文件。现在这是否意味着所有资源都没有打包?如果是这种情况,当引用所需资源时会发生什么?

In my android development project under the folder res there are all the resources my application uses. The size is 3.11 mb and contains 1013 files . On the other hand in the apk there is the folder res with all the resources as well , but this has a size of only 760 kb and contains only 332 files . Now does this means that not all the resources are packed? If this is the case what happens when a needed resources is referenced?

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

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

发布评论

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

评论(2

风透绣罗衣 2024-09-05 08:43:08

现在这是否意味着并非所有
资源打包了吗?

不,这意味着 APK 文件是压缩的 ZIP 样式存档。

Now does this means that not all the
resources are packed ?

No, it means the APK file is a compressed ZIP-style archive.

不再见 2024-09-05 08:43:08

是的,许多 XML 都是在 resources.arsc 文件中预编译的。你可以使用aapt dump --values resources xxx.apk查看resource.arsc文件,你会发现预编译的xml。

Yes, many of the XML ones are pre-compiled in tha resource.arsc file. You can use aapt dump --values resources xxx.apk to view the resource.arsc file, and you will find that pre-compiled xml.

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