排除 jar 中的文件进入 apk [英] Exclude files in jar from going into the apk
问题描述
我最近在我的 android 项目中添加了一些新的 jar.一些 jar 包含 version.properties.其中之一甚至包含 README.TXT.
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.
如何告诉 eclipse/adt/ant 排除文件进入 apk?
How can I tell eclipse/adt/ant to exclude files from getting into the apk?
显然我可以解压缩apk,删除文件,压缩,签名&zipline...但我希望从源头上解决它.
Obviously I can unzip the apk, remove the files, zip, sign & zipline... but I was hoping to solve it at source.
推荐答案
如果你是从你自己的项目中创建 jar 文件,你可以右键该项目 -> 选择导出 -> 在 Java 下选择 JAR 文件 -> 然后你可以选择在创建 jar 时要包含哪些文件.因此,取消选择您不希望包含在 Jar 文件中的任何资源.
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屋!