Reputation: 390
After upgrading to Gradle version 3.1.2 from Gradle 2.x.x, retrofit2.Callback
cannot be resolved. I use Retrofit in a submodule that is added like this:
api project(path: ':sdk', configuration: 'default')
The retrofit dependencyin sdk is added like this:
api "com.squareup.retrofit2:retrofit:2.4.0"
My error message is:
Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class ***, unresolved supertypes: retrofit2.Callback
The IDE doesn't show me a problem within the class, that the Callback is missing somehow. The Android Studio version is 3.1.2.
What I tried so far:
Upvotes: 4
Views: 700
Reputation: 390
I fixed the problem by disabling "Instant Run" on Preferences -> Build, Execution, Deployment -> Instant Run.
Upvotes: 1