在对接华为视频SDK时报错:java.lang.UnsatisfiedLinkError: Unable to load library “lib\HWPuSDK”:Native library

对接华为的视频时,读取SDK时报错


Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'lib\HWPuSDK': Native library (win32-x86/lib\HWPuSDK.dll) not found in resource path ([file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/charsets.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/deploy.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/ext/access-bridge-32.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/ext/cldrdata.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/ext/dnsns.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/ext/jaccess.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/ext/jfxrt.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/ext/localedata.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/ext/nashorn.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/ext/sunec.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/ext/sunjce_provider.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/ext/sunmscapi.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/ext/sunpkcs11.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/ext/zipfs.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/javaws.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/jce.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/jfr.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/jfxswt.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/jsse.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/management-agent.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/plugin.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/resources.jar, file:/D:/DevelopTools/Java_8_i586/jdk1.8.0_251/jre/lib/rt.jar, file:/D:/Development/project/biocv/huawei-camera-sdk/target/classes/, file:/D:/DevelopTools/maven/maven_repository/net/java/dev/jna/jna-platform/5.0.0/jna-platform-5.0.0.jar, file:/D:/DevelopTools/maven/maven_repository/net/java/dev/jna/jna/5.0.0/jna-5.0.0.jar, file:/D:/DevelopTools/maven/maven_repository/com/jgoodies/forms/1.2.1/forms-1.2.1.jar, file:/D:/DevelopTools/maven/maven_repository/com/google/code/findbugs/annotations/2.0.2/annotations-2.0.2.jar, file:/D:/DevelopTools/IntelliJ%20IDEA%202019.3.1/lib/idea_rt.jar])
`

读取dll库文件代码如下:

HWPuSDK SSL_INSTANCE = Native.load((Platform.isWindows() ? "lib\\HWPuSDK" : "ssl"), HWPuSDK.class);
    HWPuSDK INSTANCE = Native.load((Platform.isWindows() ? "lib\\HWPuSDK" : "hwpusdk"), HWPuSDK.class);
    public static class LLong extends IntegerType {
        private static final long serialVersionUID = 1L;

        /** Size of a native long, in bytes. */
        public static int size;
        static {
            size = Native.LONG_SIZE;
            if (Platform.isWindows()) {
                size = 4;
            } else {
                size = 8;
            }
        }
        /** Create a zero-valued LLong. */
        public LLong() {
            this(0);
        }
        /** Create a LLong with the given value. */
        public LLong(long value) {
            super(size, value);
        }
    }

库文件说明要用的是32位的JDK;

希望大神可以帮忙指导下。。。。!!!!

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐