我们开始处理Skobbler地图,并使用在Skobbler帐户中生成的API密钥下载了演示项目AndroidOpenSourceDemoGradle,并开始处理我们自己的纬度和经度值。
我们尝试使用方法launchRouteCalculation()通过以SKCordinate的形式传递开始位置和结束位置来计算自定义路线。
在同一方法中,我们通过传递由纬度和经度值组成的列表com.skobbler.ngx.routing.SKRouteManager.calculateRouteWithPoints()对象以及SKPostion对象来调用SKRouteSettings

我们尝试过的代码

List pointsList = new ArrayList();
pointsList.add(new SKPosition(23.609239, 46.767936));
pointsList.add(new SKPosition(23.609149, 46.769281));
pointsList.add(new SKPosition(23.605704, 46.768879));
// set the route listener
SKRouteManager.getInstance().setRouteListener(this);
SKRouteSettings routeSettings = new SKRouteSettings();
//set route mode
routeSettings.setRouteMode(SKRouteMode.CAR_FASTEST);
        SKRouteManager.getInstance().calculateRouteWithPoints(pointsList,routeSettings);


但是我们以错误说明结束


  带有企业许可证的GPX轨道导航可用于商业用途”,并且
      JNI在应用程序中检测到错误:jmethodID为NULL。


我们在日志中遇到的确切错误声明如下

04-27 23:31:44.881 9577-9577/com.skobbler.sdkdemo E/SKRouteManager: GPX track navigation is available for commercial use with a enterprise license
 04-27 23:31:44.950 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: jmethodID was NULL
04-27 23:31:44.950 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]     in call to CallDoubleMethodV

04-27 23:31:44.950 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]     from void com.skobbler.ngx.routing.SKRouteManager.createroutefromgpspoints(com.skobbler.ngx.positioner.SKPosition[], int, boolean, boolean, boolean, boolean)

04-27 23:31:44.950 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65] "main" prio=5 tid=1 Runnable

04-27 23:31:44.950 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   | group="main" sCount=0 dsCount=0 obj=0x74ab0000 self=0xf4c27800

04-27 23:31:44.950 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   | sysTid=9577 nice=0 cgrp=default sched=0/0 handle=0xf723bbec

04-27 23:31:44.950 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   | state=R schedstat=( 1395219590 318169633 1433 ) utm=113 stm=26 core=0 HZ=100

04-27 23:31:44.950 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   | stack=0xff563000-0xff565000 stackSize=8MB

04-27 23:31:44.950 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   | held mutexes= "mutator lock"(shared held)

04-27 23:31:44.950 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   native: #00 pc 0000485c  /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)

04-27 23:31:44.950 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   native: #01 pc 00003005  /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)

04-27 23:31:44.950 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   native: #02 pc 00243911  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+68)

04-27 23:31:44.951 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   native: #03 pc 00227cb9  /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+144)

04-27 23:31:44.951 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   native: #04 pc 000aff1b  /system/lib/libart.so (art::JniAbort(char const*, char const*)+582)

04-27 23:31:44.951 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   native: #05 pc 000b0661  /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+60)

04-27 23:31:44.951 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   native: #06 pc 000b090b  /system/lib/libart.so (art::ScopedCheck::CheckSig(_jmethodID*, char const*, bool) (.constprop.131)+358)

04-27 23:31:44.951 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   native: #07 pc 000ba779  /system/lib/libart.so (art::CheckJNI::CallDoubleMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+60)

04-27 23:31:44.951 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   native: #08 pc 000fa67b  /data/app/com.skobbler.sdkdemo-1/lib/arm/libngnative.so (_JNIEnv::CallDoubleMethod(_jobject*, _jmethodID*, ...)+22)

04-27 23:31:44.951 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   native: #09 pc 000e9df1  /data/app/com.skobbler.sdkdemo-1/lib/arm/libngnative.so (Java_com_skobbler_ngx_routing_SKRouteManager_createroutefromgpspoints+144)

04-27 23:31:44.951 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   native: #10 pc 0019c8d3  /data/dalvik-cache/arm/data@[email protected]@[email protected] (Java_com_skobbler_ngx_routing_SKRouteManager_createroutefromgpspoints___3Lcom_skobbler_ngx_positioner_SKPosition_2IZZZZ+142)

04-27 23:31:44.951 9577-9577/com.skobbler.sdkdemo A/art: art/runtime/check_jni.cc:65]   at com.skobbler.ngx.routing.SKRouteManager.createroutefromgpspoints(Native method) 04-27 23:31:44.951 9577-9577/com.skobbler.sdkdemo A/art:         art/runtime/check_jni.cc:65] atcom.skobbler.ngx.routing.SKRouteManager.calculateRouteWithPoints(SourceFile:327)


有人可以帮助我们解决此错误吗?

最佳答案

这是2.5.1 SDK的已知错误。提供了一个修补程序来解决此问题。可以从here下载2.5.1的最新版本。

10-06 11:31