.Jar file reduction to facilitate Android application

Background: In the process of creating an Android application, I was busy with various hashing technologies and speed. I used the native Android stuff until I found a SpongyCastle (i.e. BouncyCastle), which turned out to be much faster. The SpongyCastle.jar file is quite large, and my .apk is more than 800 KB with only a bank and several test classes (and all the necessary android fluff).

Question pt 1: Is this normal for .jar files for the APK? Do they usually inflate a file?

Question pt 2: Is there a way for me (via source or jar) to shorten the file? I use only SHA256 and SHA1 schemes, and I could not figure out how to use only these two hash schemes, not including the whole bank.

Thoughts?

Edited: ProGuard works wonders.

+5
source share
1 answer

Use ProGuard . It is superior when trimming part of the dependencies that you are not using. It is specifically mentioned for use in Android applications here .

(I contribute to Guava, which is a pretty large library, but many people want to use it for Android. We point them to ProGuard.)

+4
source

All Articles