Comments (6)
Having the same issue just running the debug apk file. Crashing after selecting a camera on Android 4.4.2 Samsung Galaxy Tab 8.1 Pro
from uvccamera.
Seems to be failing here. Says: java.lang.NoClassDefFoundError: com/serenegiant/usb/UVCCamera
. But the other libraries load fine and I am not sure why if this one is going to fail. I'll keep researching.
from uvccamera.
Figured it out. This line and this line need to be changed to the correct directory path of your files. So for instance, I changed line 231 to com/thd/usbcameratest/usb/UVCCamera
since that is my project structure, and it works fine then (and I did something similar for line 223). Would be nice to use some dependence injection principles here instead of having to hard code in the project structure. I might fork this and make this change.
from uvccamera.
Hi, I'm sorry answer is delay.
If you want to change class name or package name of UVCCamera.java, you also need to change native side as nmcdonaldd said. Additionally need to add proguard settings in proguard-project.txt
for release build.
Currently it is like this.
-keepclassmembers public class com.serenegiant.usb.UVCCamera {
public *;
protected *;
private *;
}
saki
from uvccamera.
hi,saik!
how to fix this issues? follow nmcdonaldd,line 231,line 223 no path setting can find.
static jint nativeSetFrameCallback(JNIEnv *env, jobject thiz,
ID_TYPE id_camera, jobject jIFrameCallback, jint pixel_format) {
jint result = JNI_ERR;
ENTER(); //line 223
UVCCamera *camera = reinterpret_cast<UVCCamera *>(id_camera);
if (LIKELY(camera)) {
jobject frame_callback_obj = env->NewGlobalRef(jIFrameCallback);
result = camera->setFrameCallback(env, frame_callback_obj, pixel_format);
}
RETURN(result, jint);
}
//line 231
from uvccamera.
Hi,
Di you see any error message on log cat? I assume you would forget to change line 846 of serenegiant_usb_UVCCamera.cpp
to your FQN(fully qualified name).
As you can see on USBCameraTest5 project, nativeSetFrameCallback
function(and it's dependency; UVCCamera#setFrameCallback and UVCPreview#setFrameCallback) does not depend on what class actually implements the IFrameCallback(but needs to keep existing the instance).
Although I'm not sure why you want to change FQN...you usually don't change FQN of any classes on Android SDK, Java libraries etc. don't you? I think in most case it is just increase useless trouble...
with best regards,
saki
from uvccamera.
Related Issues (20)
- Is it possible to set breakpoint in *.c file for trace code?
- Unable to exit the app, always in the background
- No camera connect, call connect;nativeConnect return 0
- Android 13 issue. HOT 6
- pthread_mutex_lock called on a destroyed mutex
- How to compile this code in Android Studio Flamingo | 2022.2.1
- A patch for USBMonitor.java to avoid crash in USB 3.0 HUB
- Working with FLIR Boson camera
- jpeg_read_scanlines crash
- java.lang.RuntimeException: Unable to start activity ComponentInfo : java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity HOT 1
- How to make zoom of texture ( input frames of camera) in UVCCameraTextureView ? HOT 1
- After multiple attempts to open the UVC camera, it fails to reopen. Assistance is requested HOT 2
- Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.serenegiant:common:2.12.5.
- The preview freezes when you press record on the Samsung a54 HOT 1
- MediaRecorder instead of MediaEncoder
- [Security] libjpeg-turbo used in this project is vulnerable
- Can't get started HOT 1
- Android11, RK3568, null pointer dereference HOT 2
- Permission pop-up giving illegal agruement exception in TargetSdk>27
- SQ 29 Camera does not display image HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uvccamera.