问题
I am desperately trying to build an opencv-based gradle project but so far I have not been able to make it run successfully.
In this regard, I need to add a native library for the opencv-jar. I compiled the local jar with
compile files('libs/opencv/mac/opencv-320.jar')
but always get the following exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java320 in java.library.path
Of course it is because I did not add the libopencv_java320.dylib on mac / .dll on windows native library to the .jar, which was absolutely no problem doing it manually. Is there a native gradle solution for my case? I did not find any plugin right now.
来源:https://stackoverflow.com/questions/44985346/add-native-library-to-local-jar-in-gradle-build