title: Android & Proguard - how to obfuscate, but not optimise out any code?
body: <p>I want to use Proguard to obfuscate an app's code. I don't need optimisations, and I don't need Proguard to strip any classes or methods out. All I want is obfuscation. The app uses several library projects.</p>
  
  <p>I've been banging my head against the wall trying to make it happen and it's not working the way I want. I am seeing NoSuchMethodExceptions thrown in the app when executed, even though I thought I had turned off Proguard's shrinking options.</p>
  
  <p>What are the magic settings to have Proguard JUST obfuscate, and not optimise away ANY code?</p>
  
  <p>UPDATE. I've confirmed through trial and error that it is the obfuscation process (not the optimisation or shrinking) that is causing the NoSuchMethodExceptions. </p>
  
  <p>Proguard.cfg</p>
  
  <pre><code>-dontpreverify
  -repackageclasses ''
  -allowaccessmodification
  -optimizations !code/simplification/arithmetic
  -keepattributes *Annotation*
  -dontshrink
  -keep public class * extends Object
  -keep class com.myapp.** { *; }
  -keep public class * extends android.app.Activity
  -keep public class * extends android.app.Application
  -keep public class * extends android.app.Service
  -keep public class * extends android.content.BroadcastReceiver
  -keep public class * extends android.content.ContentProvider
  -keep public class com.myapp.activity.Splash
  -keep public class com.myapp.alarm.AlarmsViewer
  -keep public class com.myapp.activity.About
  -keep public class com.myapp.activity.Base
  -keep public class com.myapp.activity.BaseWithMenu
  -keep public class com.myapp.alarm.Alarm
  -keep public class com.myapp.alarm.AlarmFragment
  -keep public class com.myapp.alarm.AlarmPagerAdapter
  -keep public class com.myapp.alarm.AlarmStore
  -keep public class com.myapp.app.App
  -keep public class com.myapp.preferences.Preferences
  -keep public class com.myapp.preferences.PreferencesStore
  
  -keep public class * extends android.view.View {
      public &lt;init&gt;(android.content.Context);
      public &lt;init&gt;(android.content.Context, android.util.AttributeSet);
      public &lt;init&gt;(android.content.Context, android.util.AttributeSet, int);
      public void set*(...);
  }
  
  -keepclasseswithmembers class * {
      public &lt;init&gt;(android.content.Context, android.util.AttributeSet);
  }
  
  -keepclasseswithmembers class * {
      public &lt;init&gt;(android.content.Context, android.util.AttributeSet, int);
  }
  
  -keepclassmembers class * implements android.os.Parcelable {
      static android.os.Parcelable$Creator CREATOR;
  }
  
  -keepclassmembers class **.R$* {
      public static &lt;fields&gt;;
  }
  
  -keep class android.support.v4.app.** { *; }
  -keep interface android.support.v4.app.** { *; }
  -keep class com.actionbarsherlock.** { *; }
  -keep interface com.actionbarsherlock.** { *; }
  
  -keepattributes *Annotation*
  
  -keep public interface com.android.vending.licensing.ILicensingService
  
  -dontwarn android.support.**
  </code></pre>