开发者

Navit Excepition:java.lang.ExceptionInInitializerError

开发者 https://www.devze.com 2023-03-12 01:17 出处:网络
While running the Navit code for car navigation, I am getting the following exception, i thought that navit library is not available. please any one help me.

While running the Navit code for car navigation, I am getting the following exception, i thought that navit library is not available. please any one help me.

E/AndroidRuntime(  365): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime(  365): java.lang.ExceptionInInitializerError
E/AndroidRuntime(  365):        at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime(  365):        at java.lang.Class.newInstance(Class.java:1472)
E/AndroidRuntime(  365):        at android.app.Instrumentation.newActivity(Instrumentation.java:1097)
E/AndroidRuntime(  365):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2316)
E/AndroidRuntime(  365):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
E/AndroidRuntime(  365):        at android.app.ActivityThread.access$2100(ActivityThread.java:116)
E/AndroidRuntime(  365):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
E/AndroidRuntime(  365):        at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  365):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  365):        at android.app.ActivityThread.main(ActivityThread.java:4203)
E/AndroidRuntime(  365):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  365):        at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(  365):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime(  365):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
E/AndroidRuntime(  365):        at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(  365): Caused by: java.lang.UnsatisfiedLinkError: Library navit not found
E/AndroidRuntime(  365):        at java.lang.Runtime.loadLibrary(Runtime.java:489)
E/AndroidRuntime(  365):        at java.lang.System.loadLibrary(System.java:557)

i downloaded the Navit code from , navit svn.ttps://navit.svn.sourceforge.net/svnroot/navit/trunk/navit But unable to run the cod开发者_Go百科e.

i want to run this code in Eclipse for Android Project.


  1. You need to download Android NDK
  2. Create standalong tools for your ARCH
  3. Cross compile to ARM
  4. Run make apkg


This error is due to missing libnavit.so.

  1. Put libnavit.so it in /data/local
  2. Change System.LoadLibrary to System.Load("/data/local/libnavit.so");
  3. make apkg
  4. Install
  5. This exception should go away.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号