我们如何 fork opencv-android repo 并在自己的项目中使用它?

How can we fork opencv-android repo and use it in own project?

我在这个 repo https://github.com/quickbirdstudios/opencv-android. its worked and also camera was running. But there is a issue with camera orientation in this repo. So I just forked and published mine using https://jitpack.io/ 中将 openCV 用于 android,没有任何更改(只是为了检查它是否工作)。

build.gradle:

dependencies {
  implementation 'com.quickbirdstudios:opencv:3.4.1' 
}

使用 jitpack 发布并更改我的依赖项后:

dependencies {
    implementation 'com.github.Balasnest:opencv-android:0.1.1' // gradle build success here
}

但问题是在执行以下代码时出现错误提示 OpenCV error: Cannot load info library for OpenCV

public class MainActivity extends Activity {
    static {
        if (!OpenCVLoader.initDebug()) // Failed to load OpenCV
            Log.d("ERROR", "Unable to load OpenCV");
        else
            Log.d("SUCCESS", "OpenCV loaded");
    }
...
}

错误日志:

D/OpenCV/StaticHelper: Trying to get library list
09-17 00:15:04.423 14150-14150/com.app E/OpenCV/StaticHelper: OpenCV error: Cannot load info library for OpenCV
09-17 00:15:04.423 14150-14150/com.app D/OpenCV/StaticHelper: Library list: ""
09-17 00:15:04.423 14150-14150/com.app D/OpenCV/StaticHelper: First attempt to load libs
09-17 00:15:04.423 14150-14150/com.app D/OpenCV/StaticHelper: Trying to init OpenCV libs
09-17 00:15:04.423 14150-14150/com.app D/OpenCV/StaticHelper: Trying to load library opencv_java3
09-17 00:15:04.424 14150-14150/com.app D/OpenCV/StaticHelper: Cannot load library "opencv_java3"
09-17 00:15:04.424 14150-14150/com.app W/System.err: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.app-1/base.apk"],nativeLibraryDirectories=[/data/app/com.app-1/lib/arm, /data/app/com.app-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]] couldn't find "libopencv_java3.so"
09-17 00:15:04.439 14150-14150/com.app W/System.err:     at java.lang.Runtime.loadLibrary(Runtime.java:367)
09-17 00:15:04.439 14150-14150/com.app W/System.err:     at java.lang.System.loadLibrary(System.java:1076)
09-17 00:15:04.439 14150-14150/com.app W/System.err:     at org.opencv.android.StaticHelper.loadLibrary(StaticHelper.java:67)
09-17 00:15:04.439 14150-14150/com.app W/System.err:     at org.opencv.android.StaticHelper.initOpenCVLibs(StaticHelper.java:98)
09-17 00:15:04.439 14150-14150/com.app W/System.err:     at org.opencv.android.StaticHelper.initOpenCV(StaticHelper.java:42)
09-17 00:15:04.439 14150-14150/com.app W/System.err:     at org.opencv.android.OpenCVLoader.initDebug(OpenCVLoader.java:107)

让我知道我们如何 fork opencv-android lib,修改并在我们的项目中使用它?为什么 OpenCV 库没有从我的分叉回购中加载?

我已经从 diff OpenCV 中分叉出来 repo and it worked. but not sure why it didn't work with this