1

如果有任何重复的帖子,我很抱歉,但我已经尝试解决这个问题一周并寻找解决方案,但直到现在还没有得到它。

尝试从这里运行代码时遇到问题:https ://github.com/graphhopper/graphhopper/tree/master/android

我也从这里读过很多遍:github.com/graphhopper/graphhopper/blob/master/docs/android/index.md

这是我在将项目导入 eclipse 后所做的:

我下载了基于 build.gradle 的 jar,它是:

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'
}

然后我在 MainActivity.java 中看到了这段代码:
private String fileListURL = " https://graphhopper.com/public/maps/0.5/ ";

我可以编译并运行它,然后从应用程序下载地图。但是当应用程序尝试加载地图时,它会显示一条错误消息:

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

我尝试将 fileListURL 更改为 0.1、0.2、0.3、0.4 和 0.5,但得到了同样的错误

供参考 :

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

列出罐子:
- 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

希望你能帮我解决这个问题。

4

0 回答 0