views:

161

answers:

1

I am trying to use progurard with my android applications. The proguardGui accepts an input, and an output, the input requires a jar file. but the APK file for android doesn't contain any jar?

I tried passing the apk file, and also the dex file inside the apx, but proguard doesn't accept them as an input. proguard only accepts jars, ears, wars, zips so how can i use the proguard gui with my android application?

+1  A: 

I detailed complete instructions on how to do it here: http://www.androidengineer.com/2010/07/optimizing-obfuscating-and-shrinking.html

Basically, you have to first set up an Ant build for your Android project, which is relatively painless. Then, you add in the ProGuard Ant target between the Java compilation step and the DEX step. Remember, ProGuard only works on Java bytecode, and Android uses the Dalvik JVM which uses .dex bytecode, so that's why it happens between those two steps.

Matt
thanks for the link, that seems to be a lot of work :( I don't even know what ant is
aryaxt