A discussion from the ProGuard's forum: =================================================
We have a question on the ProGuard's "dontoptimize" option. According to the ProGuard's doc's description, "-dontoptimize Specifies not to optimize the input class files. By default, optimization is enabled; all methods are optimized at a bytecode level. " Our understanding is that by default when the optimization option is on, all methods are optimized utilizing some specific properties of conventional JVM. Our questions are, 1. What properties of the conventional JVM are exploited? 2. How to optimze the bytecode aligned with those properties? The reason that we ask those questions is that, when we obfuscate Java bytecode, then convert it into Google/Android dex file, exceptions are thrown, saying some convertion doesn't work properly. However, after we put on the "dontoptimze" option, the convertion works fine. Very curious what happens under the surface. RE: A question on the "dontoptimize" option. (New) By: Eric Lafortune (lafortuneProject Admin) - 2008-07-09 01:16 The optimizations are listed in the ProGuard FAQ, question #4. There are many different types of optimizations, but the output should always be valid bytecode. If the code works in a JVM, but not with Android, it's most likely a bug in the Android tool. If the code also fails in a JVM, you should provide some more details, so I can investigate. Eric. ==================================== What do you think about Eric's " If the code works in a JVM, but not with Android, it's most likely a bug in the Android tool"?? The android tool here should be dx tool. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---