okhttp 3.8.0: ProGuard "can't find referenced class javax.annotation.Nullable"
See original GitHub issueAccording to the 3.8.0 CHANGELOG: “We’ve added a compile-time dependency on the JSR 305 annotations. This is a provided dependency and does not need to be included in your build configuration…”
However, ProGuard brings a lot of messages like this:
okhttp3.Address: can't find referenced class javax.annotation.Nullable
…
This can be worked around by adding jsr305 to the gradle configuration:
compile 'com.google.code.findbugs:jsr305:3.0.2'
However, according to the docs, this should be done by okhttp dependencies.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
When I Generate signed APK, I got an issue - Stack Overflow
I have fix by adding below code in proguard. -dontwarn okio. ... -keep class com.squareup.okhttp3. ... Nullable -dontwarn javax.annotation.
Read more >Proguard Can't Find Referenced Class - ADocLib
I have updated Retrofit v 2.3.0 and okhttp 3.8.0 and okio 1.13.0 but now OkHttpCall: can't find referenced class javax.annotation.concurrent.
Read more >Troubleshooting ProGuard issues on Android - Medium
The OkHttp library added new annotations ( javax.annotation.Nullable ) to their classes in version 3.8.0. Because they use a compile-time ...
Read more >3.x Change Log - OkHttp
Fix: Don't crash when running as a plugin in Android Studio Canary 4.1. To enable platform-specific TLS features OkHttp must detect whether it's...
Read more >What does these errors mean and how do I resolve them?
Nullable. UATHelper: Packaging (Android (ETC1)): Warning: okhttp3.Address: can't find referenced class javax.annotation.Nullable.
Read more >Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Have a look at - https://github.com/square/okhttp/pull/3354
That is not OkHttp’s package and so those rules are effectively useless (aside from dropping warnings in Okio and for JSR 305 annotations). Even if it was OkHttp’s correct package, you’re better off turning off ProGuard than doing such an overly-keepy rule.
On Thu, Oct 26, 2017 at 4:22 PM attaullahpro notifications@github.com wrote: