Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.UnsatisfiedLinkError: dlopen failed: library "../../lib/libopencv_core.so" not found #3

Closed
SheldonLaw opened this issue Feb 21, 2017 · 4 comments

Comments

@SheldonLaw
Copy link

When I compile this project with the blew config, I get this error.

targetSdkVersion 23

but when I change to targetSdkVersion 19, everything goes well.

Process: kong.qingwei.kqwfacedetectiondemo, PID: 28546
java.lang.UnsatisfiedLinkError: dlopen failed: library "../../lib/libopencv_core.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:977)
at java.lang.System.loadLibrary(System.java:1530)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:711)
at com.googlecode.javacpp.Loader.load(Loader.java:586)
at com.googlecode.javacpp.Loader.load(Loader.java:540)
at com.googlecode.javacv.cpp.opencv_highgui.(opencv_highgui.java:79)
at com.googlecode.javacv.cpp.opencv_highgui.cvLoadImage(Native Method)
at kong.qingwei.kqwfacedetectiondemo.FaceUtil.CmpPic(FaceUtil.java:100)
at kong.qingwei.kqwfacedetectiondemo.MainActivity.onFace(MainActivity.java:119)
at kong.qingwei.kqwfacedetectiondemo.CameraFaceDetectionView.onCameraFrame(CameraFaceDetectionView.java:151)
at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:387)
at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:346)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "../../lib/libopencv_core.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:977)
at java.lang.System.loadLibrary(System.java:1530)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:711)
at com.googlecode.javacpp.Loader.load(Loader.java:577)

@kongqw
Copy link
Owner

kongqw commented Feb 21, 2017

thx,i will be fix

@kongqw
Copy link
Owner

kongqw commented Feb 21, 2017

please try again:)
@CODE-FOR-INTEREST

@SheldonLaw
Copy link
Author

E/AndroidRuntime: FATAL EXCEPTION: main
Process: kong.qingwei.kqwfacedetectiondemo, PID: 4014
java.lang.RuntimeException: Unable to start activity ComponentInfo{kong.qingwei.kqwfacedetectiondemo/kong.qingwei.kqwfacedetectiondemo.MainActivity}: android.view.InflateException: Binary XML file line #45: Binary XML file line #45: Error inflating class com.kongqw.view.CameraFaceDetectionView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2702)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2788)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1503)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6209)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: android.view.InflateException: Binary XML file line #45: Binary XML file line #45: Error inflating class com.kongqw.view.CameraFaceDetectionView
Caused by: android.view.InflateException: Binary XML file line #45: Error inflating class com.kongqw.view.CameraFaceDetectionView
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:645)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at kong.qingwei.kqwfacedetectiondemo.MainActivity.onCreate(MainActivity.java:39)
at android.app.Activity.performCreate(Activity.java:6745)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1134)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2655)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2788)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1503)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6209)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
at android.view.ViewRootImpl.setView(ViewRootImpl.java:700)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:342)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94)
at android.app.Dialog.show(Dialog.java:316)
at org.opencv.android.BaseLoaderCallback.onPackageInstall(BaseLoaderCallback.java:110)
at org.opencv.android.AsyncServiceHelper.InstallService(AsyncServiceHelper.java:133)
at org.opencv.android.AsyncServiceHelper.initOpenCV(AsyncServiceHelper.java:49)
at org.opencv.android.OpenCVLoader.initAsync(OpenCVLoader.java:89)
E/AndroidRuntime: at com.kongqw.view.CameraFaceDetectionView.loadOpenCV(CameraFaceDetectionView.java:54)
at com.kongqw.view.CameraFaceDetectionView.(CameraFaceDetectionView.java:47)
... 27 more

@kongqw
Copy link
Owner

kongqw commented Feb 21, 2017

you don‘t install OpenCV Manager! install it!
@CODE-FOR-INTEREST

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants