简体   繁体   English

如何在.apk中更新资源文件

[英]How to update resources file in .apk

When creating my (unsigned) apk file, my res/values/ folder disappears when viewing the apk file through an unzipping program. 创建我的(未签名)apk文件时,我的res / values /文件夹在通过解压缩程序查看apk文件时消失。 However, the res/drawables and res/layout folders show up. 但是,res / drawables和res / layout文件夹会显示出来。 Is there any way to ensure the apk file contains the res/values/ folder? 有没有办法确保apk文件包含res / values /文件夹?

The main use case I have is updating various values in the resources file located in res/values depending on the customer's needs. 我的主要用例是根据客户的需要更新res /值中资源文件中的各种值。

Thanks in advance! 提前致谢!

This is as intended. 这是预期的。 The values folder is compile in binary format and you cannot retrieve it. values文件夹以二进制格式编译,您无法检索它。 If you need to change something, then you need to repackage everything again. 如果你需要改变一些东西,那么你需要重新包装一切。

All XML resources are compiled into binary format for performance reasons. 出于性能原因,所有XML资源都被编译为二进制格式。 SO you would not be able to see them. 所以你将无法看到它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM