I'm following a tutorial online to get information from a local API using retrofit2, but when I run my code I get:
java.lang.IllegalArgumentException: No Retrofit annotation found. (parameter #1)
I notice most answers online have this problem when POSTing but all I'm trying to do is GET all the items in the database. The API part o this works and when I go to the local IP (10.0.2.2) on the emulator it gives me what I want. I don't understand why I'm getting this problem, actually still trying to fully understand the base code. I also saw some solutions using .enqueue but I guess i don't fully understand how to use it.
@GET("/institute/Students")
void getStudent(Callback<List<Student>> callback);
InstituteService serv = restService.getService();
serv.getStudent(new Callback<List<Student>>() {...}
I'm trying to get a list of students from my database but I'm stuck right here. After initiating the Callback it goes straight to the onFailure activity. Any point in the right direction appreciated.