2016-05-12 169 views
1

我已經在Android Studio中設置了OpenCV SDK(https://www.learn2crack.com/2016/03/setup-opencv-sdk-android-studio.html),但似乎我得到了這種錯誤消息。Android - OpenCV錯誤:無法加載OpenCV的信息庫

05-12 03:30:08.819 5480-5480/my.xxxxx I/art: Late-enabling -Xcheck:jni 
05-12 03:30:08.925 5480-5480/my.xxxxx D/OpenCV/StaticHelper: Trying to get library list 
05-12 03:30:08.926 5480-5480/my.xxxxx E/OpenCV/StaticHelper: OpenCV error: Cannot load info library for OpenCV 
05-12 03:30:08.926 5480-5480/my.xxxxx D/OpenCV/StaticHelper: Library list: "" 
05-12 03:30:08.926 5480-5480/my.xxxxx D/OpenCV/StaticHelper: First attempt to load libs 
05-12 03:30:08.926 5480-5480/my.xxxxx D/OpenCV/StaticHelper: Trying to init OpenCV libs 
05-12 03:30:08.926 5480-5480/my.xxxxx D/OpenCV/StaticHelper: Trying to load library opencv_java3 
05-12 03:30:08.926 5480-5480/my.xxxxx D/OpenCV/StaticHelper: Cannot load library "opencv_java3" 

我已經包括opencv_java3JNI文件夾中。

enter image description here

請指點。謝謝。

+0

嗨,你找到解決方案嗎?我正在與同樣的問題作鬥爭。我用這裏的教程http://stackoverflow.com/questions/27406303/opencv-in-android-studio .. – kvgr

+0

@Mohammad你解決了你的問題我有同樣的問題可以分享你的答案,如果你解決了它? – Yirga

回答

1

您可以嘗試包括opencv_java3jniLibs文件夾中,這樣的:

Android Studio Image

0

一年多過去了,但我發現這是爲我工作。在你的應用程序模塊gradle文件中,添加:

splits { 
     abi { 
      enable true 
      reset() 
      include 'x86', 'armeabi-v7a', 'x86_64' 
      universalApk true 
     } 
    } 

這應該放在android括號內。很明顯,您可以根據自己的需要調整包含。