背景:在创建Android应用程序的过程中,我正在弄乱不同的散列技术和速度.我是用了Android原生的东西,直到我发现SpongyCastle(即BouncyCastle的),这被证明是一个速度快了很多.SpongyCastle .jar文件相当大,我的.apk超过800kb只有jar和几个测试类(以及所有必要的android fluff).
问题第1点:.jar文件对于APK是否正常?他们通常会臃肿文件吗?
问题第2题:我有没有办法(通过源或罐子)减少文件?我只使用SHA256和SHA1哈希方案,我还没有弄清楚如何使用这两个哈希方案而不包括整个jar.
思考?
编辑: ProGuard创造奇迹.
之后引用短短几个 其他 的问题,我发现没有这些问题的答案在我的项目都在工作.将jar放入每个单独模块的/ libs文件夹中,ant build正确运行并产生输出.删除所有/ libs文件夹并在我需要的每个模块中包含一个ant.properties文件(aka build.properties)后,ant build已停止工作.
ant.properties:
# This file is used to override default values used by the Ant build system.
#
# This file must be checked in Version Control Systems, as it is
# integral to the build system of your project.
# This file is only used by the Ant script.
# You can use this to override default values such as
# 'source.dir' for the location …Run Code Online (Sandbox Code Playgroud)