I am trying to start working with the Retrofit library, created the interface I am writing "@GET" and immediately the error '@GET' is not applicable to type, it seems to be doing everything correctly. My builde.gradle

dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.3.0' compile 'com.android.support:design:23.3.0' compile 'com.android.support:cardview-v7:21.0.0-rc1' compile 'com.android.support:cardview-v7:+' compile 'com.squareup.retrofit2:retrofit:2.0.2' compile 'com.squareup.okhttp:okhttp:2.7.2' compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2' compile 'com.google.code.gson:gson:1.7.2' } 
  • show the interface code, maybe there is a problem - Saidolim
  • import retrofit2.http.GET; public interface VideoApi {@GET ("/ videos / fatured"); } but an error on @GET immediately - Rostislav Prozorovsky

1 answer 1

 public interface VideoApi { @GET("videos/fatured") Call<Ваш объект> functionName( тут параметры ); } 

and more links check, maybe there is an error