I'm using Android Studio and I would like to use Retrofit, a rest client for Android and Java.
I added retrofit in dependencies of my build.gradle file. So, I can use it on my project but when I would like to execute it, I have a NoClassDefFoundError for retrofit.RestAdapter$Builder inner class.
dependencies {
compile 'com.squareup.retrofit:retrofit:1.3.0'
}
Thanks in advance for your help.
Edit for solution :
Preferences > Compiler > Annotation Processors > Enable Annotation processing. Retrofit requires annotation processing. Try
dependencies {
apt 'com.squareup.retrofit:retrofit:1.3.0'
compile 'com.squareup.retrofit:retrofit:1.3.0'
}
Check out this post for a similar situation: Android Studio 0.4 & Butter Knife
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With