[GraphHopper] App crashed getting response from GraphHopperAPI.rout(request)

Awais Bin Asif 09bicsebasif at seecs.edu.pk
Fri May 3 15:13:00 UTC 2013


Right now i am trying to load the .map file and load the graph files (-gh
files). i have

graphhopper-0.1-SNAPSHOT-android.jar
slf4j-android-1.6.1-RC1.jar
mapsforge-map-0.3.0-jar-with-dependencies.jar
mapsforge-map-0.3.1-jar-with-dependencies.jar

under  Android Dependencies


When i tried to load the pakistan-gh file using prepareGraph() i got error

 An error happend while creating graph:Cannot load the graph - it wasn't
create via com.graphhopper.storage.LevelGraphStorage!
/mnt/sdcard/graphhopper/maps/pakistan-gh/


And When i tried to load berlin-gh files i got

 An error happend while creating graph:Invalid storage
at:/mnt/sdcard/graphhopper/maps/berlin-gh

And berlin.map and pakistan.map loads fine.

prepareGraph() is the same function available in demo project source code.





On Fri, May 3, 2013 at 11:26 AM, Peter K <peathal at yahoo.de> wrote:

>
>  Thank you for your reply. I have already tried demo app (
> GraphHopper-0.1.apk<https://code.google.com/p/graphhopper/downloads/detail?name=GraphHopper-0.1.apk&can=2&q=>)
> with berlin-gh and it works fine for me. I am using eclipse on windows 8. I
> want to integrate graphhopper's demo project code into my own android app.
> My app currently gives offline routing according to local transportation
> (Buses) available in city. i am using mapsforge api. Now I want to
> integrate functionality of graphhopper demo project in to my app such that
> I give start and end coordinates to it and it give shortest route between
> them.
>
>  I have created pakistan-gh files using pakistan-latest.osm files by
> using run.sh command. Then i tried to run it with GraphHopper-0.1.apk<https://code.google.com/p/graphhopper/downloads/detail?name=GraphHopper-0.1.apk&can=2&q=> but
> it gives error that "error while creating graph : could not load graph at
> storage /path/to/mapfolder". But i loads pakistan.map sucess fully.
>
>
> The routing files are of a newer version not compatible with
> GraphHopper-0.1.apk<https://code.google.com/p/graphhopper/downloads/detail?name=GraphHopper-0.1.apk&can=2&q=>
>
>
>  Now i am trying to run the demo project code with berlin-gh files  on
> eclipse with windows 8 because pakistan-gh is not working properly on demo
> app. 1st if code works with berlin-gh then i will switch to my own
> pakistan-gh files.  And the errors i got is explained in previous mails.
>
>
> You need to correct the android dependencies. What do you currently have
> loaded in Eclipse? graphhopper-android, mapsforge and slf4j-android?
>
> Peter.
>
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/graphhopper
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20130503/275ebf73/attachment-0001.html>


More information about the GraphHopper mailing list