Page 1 of 1

UnsatisfiedLinkError for createRouteFromSVPPoints

Posted: Tue Mar 23, 2021 12:12 pm
by MiKu_MichDem
I've encountered a problem, where the following code:

Code: Select all

NavigationSDK.createRouteFromSVPPoints(wayPointArray.size(), wayPointArray, 0x000000FF, 0x000000FF);
wayPointArray is an instance of SVPWayPointArray class

Produces a following exception:

Code: Select all

java.lang.UnsatisfiedLinkError: No implementation found for void com.ptvag.navigation.sdk.NavigationSDK.createRouteFromSVPPointsJNI(int, long, long, long) (tried Java_com_ptvag_navigation_sdk_NavigationSDK_createRouteFromSVPPointsJNI and Java_com_ptvag_navigation_sdk_NavigationSDK_createRouteFromSVPPointsJNI__IJJJ)
        at com.ptvag.navigation.sdk.NavigationSDK.createRouteFromSVPPointsJNI(Native Method)
        at com.ptvag.navigation.sdk.NavigationSDK.createRouteFromSVPPoints(NavigationSDK.java:436)
        at pl.softprojekt.fp4mtransport.gui.pages.myOrders.Tracer.draw(Tracer.java:25)
        at pl.softprojekt.fp4mtransport.gui.pages.myOrders.MyOrdersRoutePreview.decodePointCollection(MyOrdersRoutePreview.kt:141)
        at pl.softprojekt.fp4mtransport.gui.pages.myOrders.MyOrdersRoutePreview.onViewCreated(MyOrdersRoutePreview.kt:70)
        at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:332)
        at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1187)
        at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1356)
        at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1434)
        at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1497)
        at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:447)
        at androidx.fragment.app.FragmentManager.executeOps(FragmentManager.java:2169)
        at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1992)
        at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1947)
        at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1818)
        at androidx.fragment.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:303)
        at androidx.fragment.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:270)
        at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1244)
        at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1092)
        at androidx.viewpager.widget.ViewPager.onMeasure(ViewPager.java:1622)
        at android.view.View.measure(View.java:25218)
        at androidx.constraintlayout.widget.ConstraintLayout$Measurer.measure(ConstraintLayout.java:792)
        at androidx.constraintlayout.solver.widgets.ConstraintWidgetContainer.measure(ConstraintWidgetContainer.java:583)
        at androidx.constraintlayout.solver.widgets.analyzer.Direct.verticalSolvingPass(Direct.java:355)
        at androidx.constraintlayout.solver.widgets.analyzer.Direct.solveVerticalMatchConstraint(Direct.java:636)
        at androidx.constraintlayout.solver.widgets.analyzer.Direct.verticalSolvingPass(Direct.java:407)
        at androidx.constraintlayout.solver.widgets.analyzer.Direct.verticalSolvingPass(Direct.java:446)
        at androidx.constraintlayout.solver.widgets.analyzer.Direct.solvingPass(Direct.java:178)
        at androidx.constraintlayout.solver.widgets.ConstraintWidgetContainer.layout(ConstraintWidgetContainer.java:642)
        at androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure.solveLinearSystem(BasicMeasure.java:159)
        at androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure.solverMeasure(BasicMeasure.java:290)
        at androidx.constraintlayout.solver.widgets.ConstraintWidgetContainer.measure(ConstraintWidgetContainer.java:119)
        at androidx.constraintlayout.widget.ConstraintLayout.resolveSystem(ConstraintLayout.java:1578)
        at androidx.constraintlayout.widget.ConstraintLayout.onMeasure(ConstraintLayout.java:1690)
        at android.view.View.measure(View.java:25218)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6937)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
        at android.view.View.measure(View.java:25218)
        at androidx.constraintlayout.widget.ConstraintLayout$Measurer.measure(ConstraintLayout.java:792)
        at androidx.constraintlayout.solver.widgets.ConstraintWidgetContainer.measure(ConstraintWidgetContainer.java:583)

Re: UnsatisfiedLinkError for createRouteFromSVPPoints

Posted: Wed Mar 24, 2021 2:28 pm
by SebastianSchlichting
Hi,

could you please switch from using createRouteFromSVPPoints to the following:

Code: Select all

try {
    Tour tour = new Tour(new WayPoint(937168,6270162));
    SVPWayPointArray ar = new SVPWayPointArray(2);
    SVPWayPoint p1 = new SVPWayPoint(934313,6268779,-1);
    SVPWayPoint p2 = new SVPWayPoint(933440,6268782,-1);
    ar.set(0, p1);
    ar.set(1, p2);
    tour.addSVPs(ar);
    CalculateTourResult result = NavigationSDK.calculateTour(tour, calcRouteObserver);
} catch (NavigationException e) {
    e.printStackTrace();
}
The functionality which you are using is an error in the API docs, createRouteFromSVPPoints is deprecated. We will fix it in newer version.