Tag: 奥托

java.lang中。 RuntimeException未找到Retrofit注释。 (参数#3)

我正在尝试更新这个RetroFit + Otto教程 ,所以我的代码更新是: IWeather.java RetroFit 2. +不允许返回void ,所以我添加了Call getWeather(…)而不是void getWeather(…) Call getWeather(…) 。 public interface IWeather { @GET(“/{latitude},{longitude}”) Call getWeather(@Path(“latitude”) String latitude, @Path(“longitude”) String longitude, Callback callback); } ForecastClient.java RetroFit 2. +更改了他的构造函数,因此新的ForecastClient具有下一个表单。 IllegalArgumentException指向weather.getWeather(…)方法。 public class ForecastClient { private static final String BASE_URL = “https://api.darksky.net/forecast/”; private static final String API_KEY = “******************”; public static final […]