Empty json data in Release build (using proguard) Empty json data in Release build (using proguard) json json

Empty json data in Release build (using proguard)


I guess that it is caused by proguard. Proguard is probably obfuscating some portion of your code, but this code is dynamically invoked by Spring (and jackson ? you didn't mention it). (and so once it is obfuscate : dynamic invocation failed)

So try to :

  • disable proguard to confirm that it is the cause of the problem
  • if it is confirmed : try to configure it so hat it won't obfuscate class that are serialized in json (i.e. UserMessage) :

    -keep class com.company.UserMessage** { *; }


I have same issue, and I committed below 2 line

// shrinkResources true

// minifyEnabled true

enter image description here


The above answer didnt work for me may be it was correct on 2014For 2019 when I set the compileSdkVersion 28 it works.