@GET is showing error I don’t know why So my code was in java :
JavaScript
x
package com.example.goodNews;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.GET;
public interface RetrofitAPI {
@GET
Call<NewsModal> getAllNews(@Url String url);
}
Edited: Ooops my mistake, their was a typo in my gradleBuild.Dependnecies file.
Advertisement
Answer
check gradle-> app -> dependencies -> com.squareup.retrofit2:retrofit:2.9.0 is exist