I am trying to do a GET method that receives a json with retrofit but it is giving me an error. I do not know if it's because I'm not passing the parameter correctly or the Object class is not well defined.
public class MainActivity extends AppCompatActivity {
    Retrofit retrofit;
    WeatherAPI weatherAPI;
    String locationCurrent = "Barcelona";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        retrofit = new Retrofit.Builder()
                .baseUrl("http://api.apixu.com/v1/")
                .addConverterFactory(ScalarsConverterFactory.create())
                .addConverterFactory(GsonConverterFactory.create())
                .build();
        weatherAPI =retrofit.create(WeatherAPI.class);
        weatherGET(locationCurrent);
    }
    void weatherGET(final String  location){
        Call<Object> call = weatherAPI.getWeather(location);
        call.enqueue(new Callback<Object>() {
            @Override
            public void onResponse(Call <Object> call, Response<Object> response) {
                Log.d("%%%%%","Entrada");
                Object dataGETWeather;
                dataGETWeather = response.body();         Log.d("Temp",String.valueOf(dataGETWeather.CurrentObject.getTemp_c()));
            }
            @Override
            public void onFailure(Call<Object> call, Throwable t) {
                Log.d("%%%%%","Salida");
            }
        });
    }
}
Service definition:
public interface WeatherAPI {
    @GET("current.json?key=9aa4f8a0b09c4034b44183812191306&q={location}")
    @Headers("Accept:application/json")
    Call<Object> getWeather(@Query("location") String location);
}
Object to be received:
// The father of the object is this, but it has more subdivisions
public class Object {
    Location LocationObject;
    Current CurrentObject;
    // Getter Methods
    public Location getLocation() {
        return LocationObject;
    }
    public Current getCurrent() {
        return CurrentObject;
    }
    // Setter Methods
    public void setLocation(Location locationObject) {
        this.LocationObject = locationObject;
    }
    public void setCurrent(Current currentObject) {
        this.CurrentObject = currentObject;
    }
}
Log of the exception:
019-06-14 13:36:36.236 14987-14987/com.example.weatherapiE/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.weatherapi, PID: 14987
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.weatherapi/com.example.weatherapi.MainActivity}: java.lang.IllegalArgumentException: URL query string "key=9aa4f8a0b09c4034b44183812191306&q={location}" must not have replace block. For dynamic query parameters use @Query.
    for method WeatherAPI.getWeather
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)   
 
     
     
     
    