我通过在eclipse中将它们作为单独的项目导入来漫画,以获得针对黑莓项目运行的一套Junit测试。 60个奇怪的测试正确运行没有任何问题,但是2个新的测试行为使用Arrays.sort本机方法现在抛出不满意的链接错误:
java.lang.UnsatisfiedLinkError: net.rim.device.api.util.Arrays.sort([Ljava/lang/Object;Lnet/rim/device/api/util/Comparator;)V
at net.rim.device.api.util.Arrays.sort(Native Method)
at com.rapidftr.controllers.ViewController.sortByLocationThenName(ViewController.java:34)
at com.rapidftr.controllers.ViewController.show(ViewController.java:28)
at com.rapidftr.controllers.ViewControllerTest.shouldFetchFromServiceAndPushIntoScreen(ViewControllerTest.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
非常感谢任何帮助。
答案 0 :(得分:0)
来自文档:
java.lang.UnsatisfiedLinkError:抛出 如果Java虚拟机不能 找到合适的母语 声明的方法的定义 天然
JVM没有找到Arrays.sort的本地语言定义