mCameraHelper = new CameraHelper();
mCameraHelper.setStateCallback(new ICameraHelper.StateCallback() {
@Override
public void onAttach(UsbDevice device) {
if(isSupportedDevice(device)) {
mCameraHelper.selectDevice(device);
}
}
@Override
public void onDeviceOpen(UsbDevice device, boolean isFirstOpen) {
if(isSupportedDevice(device)) {
mCameraHelper.openCamera(new Size(DEFAULT_PREVIEW_FRAME_FORMAT, 2448,3264, DEFAULT_PREVIEW_FPS, new ArrayList<>(DEFAULT_PREVIEW_FPS))); // this occur error
}
}
...
});
报错:
2022-10-12 16:36:53.961 2379-2414/com.angzv.uvccamera E/angzv.uvccamer: No implementation found for long com.serenegiant.usb.UVCCamera.nativeCreate() (tried Java_com_serenegiant_usb_UVCCamera_nativeCreate and Java_com_serenegiant_usb_UVCCamera_nativeCreate)
2022-10-12 16:36:53.969 2379-2414/com.angzv.uvccamera E/AndroidRuntime: FATAL EXCEPTION: CameraHelper
Process: com.angzv.uvccamera, PID: 2379
java.lang.UnsatisfiedLinkError: No implementation found for long com.serenegiant.usb.UVCCamera.nativeCreate() (tried Java_com_serenegiant_usb_UVCCamera_nativeCreate and Java_com_serenegiant_usb_UVCCamera_nativeCreate)
at com.serenegiant.usb.UVCCamera.nativeCreate(Native Method)
at com.serenegiant.usb.UVCCamera.(UVCCamera.java:106)
at com.herohan.uvcapp.CameraInternal.openUVCCamera(CameraInternal.java:221)
at com.herohan.uvcapp.CameraInternal.openCamera(CameraInternal.java:191)
at com.herohan.uvcapp.CameraConnectionService$CameraConnection.openCamera(CameraConnectionService.java:310)
at com.herohan.uvcapp.CameraHelper.lambda$openCamera$6$CameraHelper(CameraHelper.java:253)
at com.herohan.uvcapp.-$$Lambda$CameraHelper$XS7OkjOidNGW0N8N78LHdAbIi3w.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:236)
at android.os.HandlerThread.run(HandlerThread.java:67)
代码:
报错: 2022-10-12 16:36:53.961 2379-2414/com.angzv.uvccamera E/angzv.uvccamer: No implementation found for long com.serenegiant.usb.UVCCamera.nativeCreate() (tried Java_com_serenegiant_usb_UVCCamera_nativeCreate and Java_com_serenegiant_usb_UVCCamera_nativeCreate) 2022-10-12 16:36:53.969 2379-2414/com.angzv.uvccamera E/AndroidRuntime: FATAL EXCEPTION: CameraHelper Process: com.angzv.uvccamera, PID: 2379 java.lang.UnsatisfiedLinkError: No implementation found for long com.serenegiant.usb.UVCCamera.nativeCreate() (tried Java_com_serenegiant_usb_UVCCamera_nativeCreate and Java_com_serenegiant_usb_UVCCamera_nativeCreate) at com.serenegiant.usb.UVCCamera.nativeCreate(Native Method) at com.serenegiant.usb.UVCCamera.(UVCCamera.java:106)
at com.herohan.uvcapp.CameraInternal.openUVCCamera(CameraInternal.java:221)
at com.herohan.uvcapp.CameraInternal.openCamera(CameraInternal.java:191)
at com.herohan.uvcapp.CameraConnectionService$CameraConnection.openCamera(CameraConnectionService.java:310)
at com.herohan.uvcapp.CameraHelper.lambda$openCamera$6$CameraHelper(CameraHelper.java:253)
at com.herohan.uvcapp.-$$Lambda$CameraHelper$XS7OkjOidNGW0N8N78LHdAbIi3w.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:236)
at android.os.HandlerThread.run(HandlerThread.java:67)