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
You're using beta2 versions of retrofit plugins which depend on beta2 version of retrofit which still lives in com.squreup.retrofit
package.
compile 'com.squareup.retrofit:adapter-rxjava:2.0.0-beta2'
compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2'
Then you're importing beta3 version of retrofit itself which lives in retrofit2
package. Basically it can be used alongside beta2 version.
compile 'com.squareup.retrofit2:retrofit:2.0.0-beta3'
You're not really using beta3 at all, because it's incompatible with beta2 plugins and you'd get compile time errors. Check your imports to verify.
What happened is (most likely) you use everything from com.square.retrofit
package except for the @GET
class which is from retrofit2
package. Despite their identical name these classes are not the same.
Move to beta4 and retrofit2
package. Fix your imports. Profit.
compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.0-beta4'
compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta4'