マップはオフラインで正常に動作しています.Goofabrikから.pbfファイルをダウンロードしました。ルートを検索すると次のエラーが表示されます。私はオフラインルーティングのためにgraphhopperを使いました。サポートされていないノードのバージョン:5、予想:3
8-15 23:19:03.393 19815-19880/com.github.lassana.offlineroutingsample E/AndroidRuntime: FATAL EXCEPTION: ModernAsyncTask #1 Process: com.github.lassana.offlineroutingsample, PID: 19815 java.lang.RuntimeException: An error occured while executing doInBackground() at android.support.v4.content.ModernAsyncTask$3.done(ModernAsyncTask.java:137) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) at java.util.concurrent.FutureTask.setException(FutureTask.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.IllegalStateException: Version of nodes unsupported: 5, expected:3 at com.graphhopper.storage.StorableProperties.check(StorableProperties.java:183) at com.graphhopper.storage.StorableProperties.checkVersions(StorableProperties.java:151) at com.graphhopper.storage.GraphHopperStorage.loadExisting(GraphHopperStorage.java:1374) at com.graphhopper.GraphHopper.load(GraphHopper.java:679) at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:557) at com.github.lassana.offlineroutingsample.map.routing.RouteLoader.loadInBackground(RouteLoader.java:83) at com.github.lassana.offlineroutingsample.map.routing.RouteLoader.loadInBackground(RouteLoader.java:29) at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:242) at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:51) at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:40) at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:123) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)
私は私がGradleのを同期するとき、私はこの
Error:Dependency com.graphhopper:graphhopper-android:0.5.0 on project app resolves to an APK archive which is not supported as a compilation dependency. File: /home/yubraj/.gradle/caches/modules-2/files-2.1/com.graphhopper/graphhopper-android/0.5.0/7c94e4d4c62ada47559bc8b907e7f30d8852fe68/graphhopper-android-0.5.0.apk
を得た
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
// compile project(':graphhopper-wrapper')
// https://mvnrepository.com/artifact/com.graphhopper/graphhopper-android
compile group: 'com.graphhopper', name: 'graphhopper-android', version: '0.5.0'
compile 'com.squareup:otto:1.3.6'
compile 'com.squareup.okhttp:okhttp:2.3.0'
compile 'org.osmdroid:osmdroid-android:4.2'
// compile 'org.mapsforge:mapsforge-core:0.4.3'
compile 'org.mapsforge:mapsforge-core:0.5.1'
// compile 'org.mapsforge:mapsforge-map:0.4.3'
compile 'org.mapsforge:mapsforge-map:0.5.1'
// compile 'org.mapsforge:mapsforge-map-android:0.4.3'
compile 'org.mapsforge:mapsforge-map-android:0.5.1'
// compile 'org.mapsforge:mapsforge-map-reader:0.4.3'
compile 'org.mapsforge:mapsforge-map-reader:0.5.1'
// compile 'org.slf4j:slf4j-android:1.7.7'
compile 'org.slf4j:slf4j-android:1.7.12'
compile 'com.google.android.gms:play-services:7.3.0'
}
Gradleのファイルで、私は0.5にgraphhopperを更新し、変更を加える必要があると思いましたこれに対する修正? ありがとうございます。