title: how to tell proguard not to obfuscate certain method names in my class?
body: <p>An external collections library that I'm using allows me to execute a where method on a list of custom objects. It needs the method/property name that I want to filter on and it takes it as a string. Because of obfuscation being done, the method doesn't seem to exist.</p>
  
  <p>I'm trying to tell proguard not to obfuscate methods on that object but it's not working.</p>
  
  <p>In proguard config, I'm trying this</p>
  
  <pre><code>-keep public class com.mop.mobile.myproject.obj.MyClass**
  -keepnames public class com.mop.mobile.myproject.obj.MyClass**
  </code></pre>
  
  <p>here's the logcat trace</p>
  
  <pre><code>E/AndroidRuntime(20419): FATAL EXCEPTION: main
  E/AndroidRuntime(20419): java.lang.RuntimeException: Unable to start activity Co
  mponentInfo{com.mop.mobile.myproject/com.mop.mobile.myproject.MyPagerActivity}: java.la
  ng.RuntimeException: java.lang.RuntimeException: java.lang.NoSuchMethodException
  : getMyId []
  E/AndroidRuntime(20419):        at android.app.ActivityThread.performLaunchActiv
  ity(ActivityThread.java:2059)
  E/AndroidRuntime(20419):        at android.app.ActivityThread.handleLaunchActivi
  ty(ActivityThread.java:2084)
  E/AndroidRuntime(20419):        at android.app.ActivityThread.access$600(Activit
  yThread.java:130)
  E/AndroidRuntime(20419):        at android.app.ActivityThread$H.handleMessage(Ac
  tivityThread.java:1195)
  E/AndroidRuntime(20419):        at android.os.Handler.dispatchMessage(Handler.ja
  va:99)
  E/AndroidRuntime(20419):        at android.os.Looper.loop(Looper.java:137)
  E/AndroidRuntime(20419):        at android.app.ActivityThread.main(ActivityThrea
  d.java:4745)
  E/AndroidRuntime(20419):        at java.lang.reflect.Method.invokeNative(Native
  Method)
  E/AndroidRuntime(20419):        at java.lang.reflect.Method.invoke(Method.java:5
  11)
  E/AndroidRuntime(20419):        at com.android.internal.os.ZygoteInit$MethodAndA
  rgsCaller.run(ZygoteInit.java:786)
  E/AndroidRuntime(20419):        at com.android.internal.os.ZygoteInit.main(Zygot
  eInit.java:553)
  E/AndroidRuntime(20419):        at dalvik.system.NativeStart.main(Native Method)
  
  E/AndroidRuntime(20419): Caused by: java.lang.RuntimeException: java.lang.Runtim
  eException: java.lang.NoSuchMethodException: getMyId []
  E/AndroidRuntime(20419):        at com.a.a.b.a.a.a(Unknown Source)
  E/AndroidRuntime(20419):        at com.a.a.b.a.b.a(Unknown Source)
  E/AndroidRuntime(20419):        at com.a.a.b.a.a(Unknown Source)
  E/AndroidRuntime(20419):        at com.mop.mobile.myproject.MyPagerActivity.a(Unknow
  n Source)
  E/AndroidRuntime(20419):        at com.mop.mobile.myproject.MyPagerActivity.onCreate
  (Unknown Source)
  E/AndroidRuntime(20419):        at android.app.Activity.performCreate(Activity.j
  ava:5008)
  E/AndroidRuntime(20419):        at android.app.Instrumentation.callActivityOnCre
  ate(Instrumentation.java:1079)
  E/AndroidRuntime(20419):        at android.app.ActivityThread.performLaunchActiv
  ity(ActivityThread.java:2023)
  E/AndroidRuntime(20419):        ... 11 more
  E/AndroidRuntime(20419): Caused by: java.lang.RuntimeException: java.lang.NoSuch
  MethodException: getMyId []
  E/AndroidRuntime(20419):        at com.a.a.c.a.a(Unknown Source)
  E/AndroidRuntime(20419):        ... 19 more
  E/AndroidRuntime(20419): Caused by: java.lang.NoSuchMethodException: getOverallP
  riorityId []
  E/AndroidRuntime(20419):        at java.lang.Class.getConstructorOrMethod(Class.
  java:460)
  E/AndroidRuntime(20419):        at java.lang.Class.getMethod(Class.java:915)
  E/AndroidRuntime(20419):        ... 20 more
  W/ActivityManager(  307):   Force finishing activity com.mop.mobile.myproject/.Asse
  tListPager
  W/ActivityManager(  307):   Force finishing activity com.mop.mobile.myproject/.Near
  MeActivity
  W/ActivityManager(  307): Activity pause timeout for ActivityRecord{435fbdc0 com
  .mop.mobile.myproject/.MyPagerActivity}
  I/ActivityManager(  307): No longer want com.google.android.gms (pid 20052): hid
  den #16
  W/System.err(20419): IOException processing: 26
  W/System.err(20419): java.io.IOException: Server returned: 3
  W/System.err(20419):    at android_maps_conflict_avoidance.com.google.googlenav.
  map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
  W/System.err(20419):    at android_maps_conflict_avoidance.com.google.googlenav.
  map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
  W/System.err(20419):    at android_maps_conflict_avoidance.com.google.googlenav.
  datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:
  1117)
  W/System.err(20419):    at android_maps_conflict_avoidance.com.google.googlenav.
  datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994
  )
  W/System.err(20419):    at android_maps_conflict_avoidance.com.google.googlenav.
  datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.jav
  a:1702)
  W/System.err(20419):    at java.lang.Thread.run(Thread.java:856)
  W/ActivityManager(  307): Activity destroy timeout for ActivityRecord{42a743d0 c
  om.mop.mobile.myproject/.myprojectActivity}
  W/ActivityManager(  307): Activity destroy timeout for ActivityRecord{435fbdc0 c
  om.mop.mobile.myproject/.MyPagerActivity}
  </code></pre>