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.

java.lang.NoClassDefFoundError: java.util.Objects

See original GitHub issue

this error throw when using retrofit version 2.5.0 in android lower than api 19

java.lang.NoClassDefFoundError: java.util.Objects at okhttp3.CertificatePinner.withCertificateChainCleaner(CertificatePinner.java:231) at okhttp3.OkHttpClient.<init>(OkHttpClient.java:271) at okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:1054)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

12reactions
JakeWhartoncommented, Mar 3, 2019

This is a problem with OkHttp, not Retrofit. Note OkHttp 3.13+ requires API 21+ but if you’re using 3.12 or earlier please file a bug.

5reactions
sunil91commented, Jun 11, 2019

E/AndroidRuntime: FATAL EXCEPTION: main java.lang.NoClassDefFoundError: java.util.Objects at okhttp3.CertificatePinner.withCertificateChainCleaner(CertificatePinner.java:231) at okhttp3.OkHttpClient.<init>(OkHttpClient.java:238) at okhttp3.OkHttpClient.<init>(OkHttpClient.java:202)

@JakeWharton

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.NoClassDefFoundError: java.util.Objects
The exception is thrown because all static methods of java.util.Objects are available above API 19 (Android 4.4.+). As you said in comments, ...
Read more >
3 ways to solve java.lang.NoClassDefFoundError in Java J2EE
NoClassDefFoundError in Java comes when Java Virtual Machine is not able to find a particular class at runtime which was available at compile...
Read more >
java.lang.NoClassDefFoundError - DigitalOcean
java.lang.NoClassDefFoundError is runtime error thrown when a required class is not found in the classpath and hence JVM is unable to load ...
Read more >
NoClassDefFoundError (Java Platform SE 8 )
Thrown if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a...
Read more >
ClassNotFoundException Vs NoClassDefFoundError in Java
This exception is a checked Exception derived from java.lang.Exception class and you need to provide explicit handling for it.
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