I am receiving an error while trying to open a camera through mCamera = Camera.open(); option. The error says: The method open() undefined for the type Camera
The same error also appears for the following methods:
mCamera.setPreviewDisplay(holder);
mCamera.startPreview();
mCamera.stopPreview();
mCamera.lock();
mCamera.release();
Can someone help me with this please?
Check your imports. I had a similar problem and the Camera object Eclipse chose for me was:
import android.graphics.Camera; instead it should be: import android.hardware.Camera;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With