排除jar中的文件进入apk [英] Exclude files in jar from going into the apk
问题描述
如何告诉eclipse / adt / ant排除文件进入apk?
显然我可以解压缩apk,删除文件,zip,sign& zipline ...但是我希望在源代码中解决它。
如果要从您自己的项目创建jar文件,您右键单击项目 - >选择导出 - >在Java下选择JAR文件 - >然后,您可以选择在创建jar时要包括哪些文件。所以取消选择你不想包含在Jar文件中的资源。
如果这不是您要查找的内容,还可以尝试将这些文件添加到构建配置中的排除文件夹中。以下是可能有帮助的链接。
I recently added some new jar's to my android project. Some of the jars contain version.properties. One of them even contains a README.TXT.
How can I tell eclipse/adt/ant to exclude files from getting into the apk?
Obviously I can unzip the apk, remove the files, zip, sign & zipline... but I was hoping to solve it at source.
If you are creating the jar files from your own project, you right click the project -> Select Export -> Under Java select JAR file -> Then you can choose which files to include when the jar gets created. So deselect whichever resources you don't want included in the Jar file.
If this isn't what you are looking for, you could also try adding those files to the exclusion folder in the build configuration. Here's a link that might help.
这篇关于排除jar中的文件进入apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!