简体   繁体   中英

Mapbox Directions API Android not working

I started using the Mapbox Directions API for my app, and I was about to check just if it works. I went through Antonio Zugaldia's blog which there he explains how to show directions with easy steps. ( https://www.mapbox.com/blog/android-directions-library/ )

So I started implemeting all the code and I tried running the app, but that didn't work out. I debug the app and saw that the flow broke in this line:

Response<DirectionsResponse> response = client.execute();

when I debug this line, I saw it fell down in OkHttpCall.java class in method name:

public Response<T> execute() throws IOException

on the last line which was:

return parseResponse(rawCall.execute());

So how can I make directions work easily?

Thanks for the question and sorry for the trouble. For all our services, including the Directions API, we're now using Mapbox Android Services which is much more powerful than the original library. We have documentation on how to install it here, and full example for Directions here. Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM