title: Proguard obfuscation results in java.lang.IllegalArgumentException: class declares multiple JSON fields named "a"
body: <p>Upon starting up my app logs two errors, but only after obfuscation. Without obfuscation there are no errors.</p>
  
  <p>Unless I'm being misled, the errors are like:</p>
  
  <blockquote>
    <p>class Property declares multiple JSON fields named a</p>
  </blockquote>
  
  <p>and same for class PropertyDefinition.</p>
  
  <pre><code>05/18 03:33:19.465  java.lang.IllegalArgumentException: class PropertyDefinition declares multiple JSON fields named a:  
  com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:122)
  com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:72)
  com.google.gson.Gson.getAdapter(Gson.java:349)
  com.google.gson.Gson.toJson(Gson.java:574)
  com.google.gson.Gson.toJson(Gson.java:561)
  com.google.gson.Gson.toJson(Gson.java:516)
  com.google.gson.Gson.toJson(Gson.java:496)
  Property.a(SourceFile:210) &lt;see comment in code below noting this code line&gt;
  Property.a(SourceFile:68)
  bj.a(SourceFile:44)
  aA.&lt;init&gt;(SourceFile:339)
  
  05/18 03:33:19.479  java.lang.IllegalArgumentException: class Property declares multiple JSON fields named a:  
  com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:122)
  com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:72)
  com.google.gson.Gson.getAdapter(Gson.java:349)
  com.google.gson.Gson.fromJson(Gson.java:790)
  com.google.gson.Gson.fromJson(Gson.java:757)
  com.google.gson.Gson.fromJson(Gson.java:706)
  com.google.gson.Gson.fromJson(Gson.java:678)
  Property.a(SourceFile:75) &lt;see comment in code below noting this code line&gt;
  bj.a(SourceFile:44)
  aA.&lt;init&gt;(SourceFile:339)
  </code></pre>
  
  <p>Here is the section of the obfuscation map relevant to one of the nearly identical errors. I unobfuscated the class name "Property" here and above. I don't see the problem. I have no further experience with obfuscation so I don't know what to look for.</p>
  
  <pre><code>mypackage.Property:
      mypackage.PropertyDefinition rootElement -&gt; a
      java.util.HashMap indexById -&gt; a
      java.util.HashMap indexByKey -&gt; b
      long nntgID -&gt; a
      43:54:boolean equals(java.lang.Object) -&gt; equals
      60:64:int hashCode() -&gt; hashCode
      68:84:boolean check() -&gt; a
      88:88:java.lang.String getFileName() -&gt; a
      92:92:java.lang.String getDirectory() -&gt; b
      101:102:java.lang.String getVersion() -&gt; c
      107:107:java.util.HashMap getIdIndex() -&gt; a
      112:112:java.util.HashMap getKeyIndex() -&gt; b
      122:122:long getNntgID() -&gt; a
      126:127:void setNntgID(long) -&gt; a
      142:147:void setRootElement(mypackage.PropertyDefinition) -&gt; a
      150:150:mypackage.PropertyDefinition getPropertyDefinitionById(java.lang.String) -&gt; a
      154:154:mypackage.PropertyDefinition getPropertyDefinitionByKey(java.lang.String) -&gt; b
      162:168:java.lang.String toString() -&gt; toString
      210:214:void toFile() -&gt; a
  </code></pre>
  
  <p>BTW, I have this section in my Proguard config already:</p>
  
  <pre><code>-keep class com.google.gson** { *; }
  -keepclassmembers class com.google.gson** {
     *;
  }
  </code></pre>
  
  <p>Any suggestions on where to start troubleshooting?</p>