I have an Android app that is crashing with the following error.
Caused by: java.lang.NoSuchFieldError: com.google.gson.FieldNamingPolicy.IDENTITY
at ir.<init>(App:72)
ja.a(App:653)
at ja.doInBackground(App:1)
at android.os.AsyncTask$2.call(AsyncTask.java)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
... 4 more
App crashed! Process: com.company.app
This doesn’t crash on my Nexus S running Android 4.0 ICS, however it is crashing on another beta test device that I don’t have access to. I am using the Google GSON 2.1 library.
I am also using ProGuard however if that was causing the issue I would think that would also cause the issue on my Nexus S.
Any idea why this would not occur on my test device and how I can resolve the issue?
This issue was caused by a custom Android ROM, I assume that inconsistent class files within the ROM were causing the issue as suggested in the question comments.