为Shield平板电脑开发原生相机应用程序时出错

时间:2016-01-15 16:40:30

标签: android

我正在我的Nvidia Shield平板电脑上开发本机应用程序来获取相机框架。我下载了Shield教程,我正在使用Eclipse。

我收到错误:

01-09 08:45:35.475: I/art(9536): Late-enabling -Xcheck:jni
01-09 08:45:35.559: D/AndroidRuntime(9536): Shutting down VM
01-09 08:45:35.560: E/AndroidRuntime(9536): FATAL EXCEPTION: main
01-09 08:45:35.560: E/AndroidRuntime(9536): Process: com.nvidia.NativeCamera, PID: 9536
01-09 08:45:35.560: E/AndroidRuntime(9536): java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN7android11BufferQueueC1ERKNS_2spINS_19IGraphicBufferAllocEEE" referenced by "/data/app/com.nvidia.NativeCamera-1/lib/arm/libnative_camera2.so"...
01-09 08:45:35.560: E/AndroidRuntime(9536): at java.lang.Runtime.loadLibrary(Runtime.java:372)
01-09 08:45:35.560: E/AndroidRuntime(9536): at java.lang.System.loadLibrary(System.java:1076)
01-09 08:45:35.560: E/AndroidRuntime(9536): at com.nvidia.NativeCamera.NativeCamera.<clinit>(NativeCamera.java:23)
01-09 08:45:35.560: E/AndroidRuntime(9536): at java.lang.Class.newInstance(Native Method)
01-09 08:45:35.560: E/AndroidRuntime(9536): at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
01-09 08:45:35.560: E/AndroidRuntime(9536): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2359)
01-09 08:45:35.560: E/AndroidRuntime(9536): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2518)
01-09 08:45:35.560: E/AndroidRuntime(9536): at android.app.ActivityThread.-wrap11(ActivityThread.java)
01-09 08:45:35.560: E/AndroidRuntime(9536): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1345)
01-09 08:45:35.560: E/AndroidRuntime(9536): at android.os.Handler.dispatchMessage(Handler.java:104)
01-09 08:45:35.560: E/AndroidRuntime(9536): at android.os.Looper.loop(Looper.java:148)
01-09 08:45:35.560: E/AndroidRuntime(9536): at android.app.ActivityThread.main(ActivityThread.java:5457)
01-09 08:45:35.560: E/AndroidRuntime(9536): at java.lang.reflect.Method.invoke(Native Method)
01-09 08:45:35.560: E/AndroidRuntime(9536): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
01-09 08:45:35.560: E/AndroidRuntime(9536): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

我真的不明白这个错误的原因。

这是我的github:https://github.com/xav12358/nativeCamera

有人可以帮我一把吗?

1 个答案:

答案 0 :(得分:0)

我查看你的代码,logcat行

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN7android11BufferQueueC1ERKNS_2spINS_19IGraphicBufferAllocEEE" referenced by "/data/app/com.nvidia.NativeCamera-1/lib/arm/libnative_camera2.so"...  

说你的libnative_camera2.so应该在lib / arm上但是在repo libnative_camera2.so是在/libs/armeabi-v7a/libnative_camera2.so 尝试将libnative_camera2.so移动到lib / arm /

我希望它有帮助!