I recently developed a Hikvision SDK access control and card reader link project, and the following problems appeared in the demo.
错误:java.lang.UnsatisfiedLinkError: Unable to load library ‘HCUsbSDK’: ÕҲ»µ½ָ¶¨
This kind of error means that the HCUsbSDK.dll file cannot be found (the same is true for HCNetSDK.dll). There are two ways to deal with it:
1. Change the relative path to an absolute path.
change to
HCUsbSDK INSTANCE = (HCUsbSDK) Native.loadLibrary("D:\HCUsbSDK",
HCUsbSDK.class);//我把HCUsbSDK.dll放到了D盘根目录下
2. When the first method is useless, use this method
Change HCUsbSDK.java or HCNetSDK.java to
HCUsbSDK INSTANCE = (HCUsbSDK) Native.loadLibrary("HCUsbSDK",
HCUsbSDK.class);
Then
copy the HCNetSDKCom folder and all dlls in the library file of the SDK development demo to the project root directory. Run and you're good to go.