question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Verifier rejected class com.google.gson.Gson

See original GitHub issue

Hi, I am developing Android app and I faced wired issue recently. My app worked smoothly before, then it broke down few days ago. When I run my app, I got this error. java.lang.VerifyError: Verifier rejected class com.google.gson.Gson due to bad method void com.google.gson.Gson.<clinit>() (declaration of 'com.google.gson.Gson' appears in /data/app/com.xxx.xx-1/base.apk)

I tried many ways, but I still did not fix this error. Could someone help me for this error?

Best Regards.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:20

github_iconTop GitHub Comments

2reactions
tomerpetelcommented, Jul 26, 2018

Hi, I’m getting the same thing in Google’s Pre-Launch report. The strange thing is that I haven’t changed a thing regarding the JSON library from the previous version and that version passed Pre-Launch without any errors

Issue: java.lang.VerifyError: Verifier rejected class com.google.gson.Gson: void com.google.gson.Gson.<clinit>() failed to verify: void com.google.gson.Gson.<clinit>(): [0x5] register v0 has type Precise Reference: com.google.gson.Gson$1 but expected Reference: com.google.gson.reflect.TypeToken (declaration of 'com.google.gson.Gson' appears in /data/app/com.bluegate.app-TXgbYn54WvvOMWt27q0CxQ==/base.apk)

Occurs on Pixel w/Android 8.0 and Pixel 2 w/Android P Preview

1reaction
jasonandresscommented, Jul 30, 2018

For me it was a pre-launch update on Google Publish. Once I opted out for pre-signing, everything passed. Go to the settings under pre-launch reports, go down to “Pre-launch report version”, and select to opt-out so your app doesn’t get recompiled.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What causes java.lang.VerifyError: Verifier rejected class?
I faced this issue, after tracking it down I found that I updated some dependencies in the Gradle file; which caused this crash....
Read more >
VerifyError: register has type Reference Object[] but expected ...
VerifyError: Verifier rejected class com.example.verify.a: void com.example.verify.a.a(org.json.JSONObject) failed to verify: void com.example.verify.
Read more >
Android app crash when open app - Zoom Developer Forum
VerifyError: Verifier rejected class com.brentvatne.exoplayer. ... implementation 'com.google.code.gson:gson:2.8.1'
Read more >
VerifyError | Android Developers
Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.
Read more >
java.lang.VerifyError: Verifier rejected class on Lollipop when ...
Android : java.lang.VerifyError: Verifier rejected class on Lollipop when using release APK [ Beautify Your Computer ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found