What\'s wrong with my Retrofit configuration? I\'m having this error when I\'m adding Basic Authentication with my OkHttpClient but when I used the default client without Interc
It look like you are using proguard and it is stripping annotations. To get saved from it add this lines to your proguard-rules.pro
-keepattributes *Annotation* -keep class retrofit.** { *; } -keepclasseswithmembers class * { @retrofit.http.*
; } -keepattributes Signature
if not using proguard make sure that you havn't written something in your app build.gradle something like this
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Note: Android does not come normally with many of the javax.annotation library by default.
if it is not so then try adding this in your gradle dependency (build.gradle)
provided 'org.glassfish:javax.annotation:10.0-b28'