Our application is written mostly in Kotlin which is has full interoperability with Java. It's functionally the same as it's compiled into the same code.
I've noticed that in Kotlin I get the following error:
Code: Select all
.lang.IllegalAccessError: Illegal class access: 'pl.softprojekt.fp4mtransport.gui.pages.myOrders.MyOrdersRoutePreview' attempting to access 'com.ptvag.navigation.sdk.NativeObject' (declaration of 'pl.softprojekt.fp4mtransport.gui.pages.myOrders.MyOrdersRoutePreview' appears in /data/app/pl.softprojekt.fp4mtransport-3C8qHB4JPgOa_2czl2fDZw==/base.apk!classes2.dex)
Either way. In pure Java code the SVPWayPointArray is sucesfully created, however it fails on method createRouteFromSVPPoints.
This is how the method is called:
Code: Select all
NavigationSDK.createRouteFromSVPPoints(wayPointArray.size(), wayPointArray, 0x000000FF, 0x000000FF);
And this is the exception it produces:
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)