1

I'm sorry if there any duplicate post, but I've tried to solve this for week and search for the solution, but haven't got it till now.

I have a problem when trying to run code from here : https://github.com/graphhopper/graphhopper/tree/master/android

I've read for multiple times from here too guys : github.com/graphhopper/graphhopper/blob/master/docs/android/index.md

This is what I've done after import the project to eclipse :

I download the jars based on build.gradle which is :

dependencies {
    compile(group: 'com.graphhopper', name: 'graphhopper', version: '0.4-SNAPSHOT') {
       exclude group: 'com.google.protobuf', module: 'protobuf-java'
       exclude group: 'org.openstreetmap.osmosis', module: 'osmosis-osm-binary'
       exclude group: 'org.apache.xmlgraphics', module: 'xmlgraphics-commons'
    }

    compile group: 'org.mapsforge', name: 'mapsforge-core', version: '0.5.1'
    compile group: 'org.mapsforge', name: 'mapsforge-map', version: '0.5.1'
    compile group: 'org.mapsforge', name: 'mapsforge-map-android', version: '0.5.1'
    compile group: 'org.mapsforge', name: 'mapsforge-map-reader', version: '0.5.1'

    compile group: 'org.slf4j', name: 'slf4j-android', version: '1.7.10'
    compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.10'
}

then I see this code in MainActivity.java :
private String fileListURL = "https://graphhopper.com/public/maps/0.5/";

I can compile & run this, and I download the maps from the apps. But when the apps try to load the maps, it toast an error message :

An error happened while creating graph:Version of nodes unsupported: 4, expected: 3

I've tried to change the fileListURL to 0.1, 0.2, 0.3, 0.4, and 0.5, but got the same error

FYI :

##########################

List Jars :
- graphhopper 0.4-snapshot
- mapsforge core 0.5.1
- mapsforge map 0.5.1
- mapsforge map android 0.5.1
- mapsforge map reader 0.5.1
- osmosis osm binary 0.4.3
- protobuf java 2.4.1
- slf4j android 1.7.10
- slf4j api 1.7.10
- xmlgraphic commons 1.4

Hope you can help me to solve this problem.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

0 Answers0