我是android开发中的新手。我正在尝试编译并运行下载的应用程序(GnuPG)。当我将编译后的代码运行到android模拟器上时,它会停止处理错误。
logcat显示以下详细信息。
00:29:45.163: I/ActivityThread(522): Publishing provider info.guardianproject.gpg: info.guardianproject.gpg.KeyDataProvider
00:29:45.173: I/ActivityThread(522): Publishing provider info.guardianproject.gpg.PrivateFilesProvider: info.guardianproject.gpg.PrivateFilesProvider
00:29:45.203: I/GpgApplication(522): onCreate
00:29:45.233: W/dalvikvm(522): Exception Ljava/lang/UnsatisfiedLinkError; thrown during Linfo/guardianproject/gpg/Posix;.<clinit>
00:29:45.233: D/AndroidRuntime(522): Shutting down VM
00:29:45.233: W/dalvikvm(522): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
00:29:45.243: E/AndroidRuntime(522): FATAL EXCEPTION: main
00:29:45.243: E/AndroidRuntime(522): java.lang.ExceptionInInitializerError
00:29:45.243: E/AndroidRuntime(522): at info.guardianproject.gpg.NativeHelper.setup(NativeHelper.java:71)
00:29:45.243: E/AndroidRuntime(522): at info.guardianproject.gpg.GpgApplication.onCreate(GpgApplication.java:38)
00:29:45.243: E/AndroidRuntime(522): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)
00:29:45.243: E/AndroidRuntime(522): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4244)
00:29:45.243: E/AndroidRuntime(522): at android.app.ActivityThread.access$3000(ActivityThread.java:125)
00:29:45.243: E/AndroidRuntime(522): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
00:29:45.243: E/AndroidRuntime(522): at android.os.Handler.dispatchMessage(Handler.java:99)
00:29:45.243: E/AndroidRuntime(522): at android.os.Looper.loop(Looper.java:123)
00:29:45.243: E/AndroidRuntime(522): at android.app.ActivityThread.main(ActivityThread.java:4627)
00:29:45.243: E/AndroidRuntime(522): at java.lang.reflect.Method.invokeNative(Native Method)
00:29:45.243: E/AndroidRuntime(522): at java.lang.reflect.Method.invoke(Method.java:521)
00:29:45.243: E/AndroidRuntime(522): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
00:29:45.243: E/AndroidRuntime(522): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
00:29:45.243: E/AndroidRuntime(522): at dalvik.system.NativeStart.main(Native Method)
00:29:45.243: E/AndroidRuntime(522): Caused by: java.lang.UnsatisfiedLinkError: Library posix not found
00:29:45.243: E/AndroidRuntime(522): at java.lang.Runtime.loadLibrary(Runtime.java:461)
00:29:45.243: E/AndroidRuntime(522): at java.lang.System.loadLibrary(System.java:557)
00:29:45.243: E/AndroidRuntime(522): at info.guardianproject.gpg.Posix.<clinit>(Posix.java:17)
有人能告诉我这里有什么不对吗?我是否需要添加任何其他库或我需要更改一些设置??
答案 0 :(得分:1)
你的崩溃罪魁祸首在你的堆栈追踪中报告:
Caused by: java.lang.UnsatisfiedLinkError: Library posix not found
所以基本上你缺少设备/项目上的动态链接库。