Geocoder.getFromLocation grpc failed on Android real device

前端 未结 9 640
故里飘歌
故里飘歌 2020-12-14 17:14

I need to get the city and state from latitude and longitude. Geocoder does this function to get the city and state. But I am getting an error java.io.IOException: grp

9条回答
  •  再見小時候
    2020-12-14 17:42

    It looks like this is ongoing issue that was reported in the Google issue tracker both for real devices and emulators. You can refer to the following bugs:

    https://issuetracker.google.com/issues/64418751

    https://issuetracker.google.com/issues/64247769

    Unfortunately, Google haven't solved these issues yet.

    As a workaround you can consider using the Geocoding API web service. Please note that there is a Java client library for web services that you can find on Github:

    https://github.com/googlemaps/google-maps-services-java

    Using Java client library for web services you can implement reverse geocoding lookup that shouldn't give you the error that you experience with native Android geocoder.

    The Javadoc for client library is located at

    https://googlemaps.github.io/google-maps-services-java/v0.2.5/javadoc/

    I hope this helps!

提交回复
热议问题