我正在尝试使用Google Geocode API,但仍然出现相同的错误:线程“ Rate Limited Dispatcher”中的异常java.lang.AbstractMethodError:com.google.maps.internal.OkHttpPendingResult $ 1.onResponse(Lokhttp3 / Response;)V
我不明白这意味着什么,我找不到任何解释。
GeoApiContext context = new GeoApiContext.Builder()
.apiKey(...)
.build();
GeocodingResult[] results = GeocodingApi.geocode(context,myaddress).await();
if (results.length > 0){
answerGoogle= results[0].geometry.location;
System.out.println(anwserGoogle);
}
我在第4行出现错误(GeocodingResult [] ...)您能帮我吗?
我认为缺少一个shutdown()会导致线程饱和。如果您使用的是弹簧靴,也可以以不同的方式处理此问题,您可以在此处获得更多详细信息-> Bug in google maps service