This post originated from an RSS feed registered with Java Buzz
by Fred Grott.
Original Post: Proguard settings for Android
Feed Title: ShareMe Technologies LLC-The Mobile Future
Feed URL: http://www.jroller.com/shareme/feed/entries/rss
Feed Description: A Weblog about Java programming and digital convergence on mobile devices in such areas as P2P and collaborative technology.
Issue 965 in the Android Bug DB indicates at the end in comments a Proguard setting that you should be using when including 3rd party jars and obfuscating with Proguard for Android applications. For this to work you need Proguad 4.4 beta and you switch off peephole optimizations in the Proguard configuration paramters. If a 3rd party jar is obfuscated using an obfuscator with peephole optimization it will fail in Android DVM.
From SDK 1.0 forward we have not been able to use obfuscation because we did not have a no peephole switch on obfuscators to deal with the difference in bytecode verifiers between JVMs and the DVM, now we do. Proguard however has had the feature turned off from version 4 to about 4.3 due to conflicts with other JVMs(has had the optimization, ie pephole tuned off not the swtich itself). Its just one of the many details I have had to go through and anlayze so that the AndCooper build tool has some effectiveness for developers.
Once agian to use obfuscation and otimizers with Android 1.0 through Andorid 1.5 you should be using Proguard 4.4. beta and turn off peephole optimizations. or any previous version as the peephole optimization is not enabled in versions prior to 4.4, ie version 4.0 through version 4.3.