I have implemented retrofit in my application. All server request and responses working properly. However when I execute the following line:
response = getRestClient().osrmGetRoute(mAppRouteRequest).execute();
Attempt to invoke virtual method 'java.lang.String
okhttp3.ResponseBody.string()' on a null object reference
Make sure that you check the message body before using it. If you are getting status code 200 then the response contains a message.