Skip to content
Advertisement

cannot resolve ‘@GET’ [closed]

@GET is showing error I don’t know why So my code was in java :

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

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement