排除jar中的文件进入apk [英] Exclude files in jar from going into the apk

查看:114
本文介绍了排除jar中的文件进入apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在我的 android 项目中添加了一些新的jar。一些jar包含version.properties。其中一个甚至包含一个README.TXT。



如何告诉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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆