NullPointerException: baseUrl == null Applicaiton初始化的时候写了base_url为什么还报错
来源:5-4 Restful请求的处理-2
码农灬一枚
2018-03-01
Caused by: java.lang.
at retrofit2.Utils.checkNotNull(Utils.java:286)
at retrofit2.Retrofit$Builder.baseUrl(Retrofit.java:451)
at com.qgutech.latte.net.RestCreator$RetrofitHolder.<clinit>(RestCreator.java:34)
at com.qgutech.latte.net.RestCreator$RetrofitHolder.access$200(RestCreator.java:31)
at com.qgutech.latte.net.RestCreator$RestServiceHolder.<clinit>(RestCreator.java:49)
at com.qgutech.latte.net.RestCreator$RestServiceHolder.access$000(RestCreator.java:47)
at com.qgutech.latte.net.RestCreator.getRestService(RestCreator.java:28)
at com.qgutech.latte.net.RestClient.request(RestClient.java:51)
at com.qgutech.latte.net.RestClient.get(RestClient.java:90)
at com.latte.defaults.ExampleDelegate.testRestClient(ExampleDelegate.java:51)
at com.latte.defaults.ExampleDelegate.onBindView(ExampleDelegate.java:26)
at com.qgutech.latte.delegates.BaseDelegate.onCreateView(BaseDelegate.java:37
(String) Latte.getConfigurations().get(ConfigType.API_HOST);这个写死就不报错了
1回答
-
傅猿猿
2018-03-03
后面少个/,格式问题,加上就好
00
相似问题