Add native library to local jar in gradle build

依然范特西╮ 提交于 2019-12-12 10:09:35

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!