<div dir="ltr">Ok I got a little further by following wiki instructions to the letter and generating the propper android jar :) <div><br></div><div style>Now the following commands make me have the graphhopper loaded successfully but when trying to query for a route I get and error : </div>
<div style><br></div><div style><br></div><div style>load : </div><div style><br></div><div style><div> GraphHopper tmpHopp = new GraphHopper()</div><div><span class="" style="white-space:pre">                                   </span> .forMobile()</div>
<div><span class="" style="white-space:pre">                                    </span> .encodingManager(new EncodingManager("CAR"))</div><div><span class="" style="white-space:pre">            </span>             .chShortcuts(true, true);</div><div><span class="" style="white-space:pre">             </span>             tmpHopp.load(app.getOpenedBookRoutingFolder());</div>
<div style><br></div><div style>//note that I hade to specify EncodingManager manually otherwise I had another error ... saying //No vehicles are defined (no encoding manager set) </div><div style><br></div><div style><br>
</div><div style><br></div><div style>query : </div><div style><br></div><div style><div> GHRequest req = new GHRequest(fromLat, fromLon, toLat, toLon)</div><div><span class="" style="white-space:pre">       </span>                        .algorithm("dijkstrabi").putHint("douglas.minprecision", 1);</div>
<div><span class="" style="white-space:pre">    </span>                GHResponse resp = hopper.route(req);</div><div><span class="" style="white-space:pre">       </span>                return resp;</div><div><br></div><div><br></div>
<div><br></div><div style>error : </div><div style><br></div><div style><div>07-22 06:17:31.835: E/AndroidRuntime(8018): Caused by: java.lang.IndexOutOfBoundsException: Invalid index 33, size is 9</div><div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span class="" style="white-space:pre">    </span>at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span class="" style="white-space:pre">        </span>at java.util.ArrayList.get(ArrayList.java:304)</div><div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span class="" style="white-space:pre"> </span>at com.graphhopper.storage.MMapDataAccess.getInt(MMapDataAccess.java:271)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span class="" style="white-space:pre">        </span>at com.graphhopper.storage.GraphStorage.getOtherNode(GraphStorage.java:405)</div><div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span class="" style="white-space:pre">    </span>at com.graphhopper.storage.GraphStorage.access$600(GraphStorage.java:49)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span class="" style="white-space:pre">        </span>at com.graphhopper.storage.GraphStorage$EdgeIterable.next(GraphStorage.java:577)</div><div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span class="" style="white-space:pre">       </span>at com.graphhopper.util.XFirstSearch.start(XFirstSearch.java:65)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span class="" style="white-space:pre">        </span>at com.graphhopper.storage.index.Location2NodesNtree$1.execute(Location2NodesNtree.java:545)</div><div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span class="" style="white-space:pre">   </span>at gnu.trove.impl.hash.TIntHash.forEach(TIntHash.java:178)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span class="" style="white-space:pre">        </span>at com.graphhopper.storage.index.Location2NodesNtree.findClosest(Location2NodesNtree.java:543)</div><div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span class="" style="white-space:pre"> </span>at com.graphhopper.GraphHopper.route(GraphHopper.java:456)</div>
</div></div><div style><br></div><div style><br></div><div style><br></div><div style><br></div><div style><br></div><div style><br></div><div style>What am I doing wrong ? </div><div style><br></div><div style>Thanks a lot for your help :) </div>
<div style><br></div><div style><br></div><div style><br></div><div style><br></div></div></div>