I am trying to send a query through a get request, the problem is I keep getting java.lang.IllegalArgumentException: unexpected host
HttpUrl url = new HttpUrl.Builder()
.scheme("http")
.host("10.0.2.2" + "/api/" + 7) // This is where the error is coming in
.addQueryParameter("lat", deviceLat[0])
.addQueryParameter("long", deviceLong[0])
.build();
Request request = new Request.Builder()
.url(url)
.build();
Thanks for all help :)