Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
mCamera = Camera.open();尝试通过选项打开相机时收到错误消息。错误说:The method open() undefined for the type Camera
mCamera = Camera.open();
The method open() undefined for the type Camera
以下方法也会出现相同的错误:
mCamera.setPreviewDisplay(holder); mCamera.startPreview(); mCamera.stopPreview(); mCamera.lock(); mCamera.release();
有人可以帮我吗?
检查你的进口。我遇到了类似的问题,Eclipse 为我选择的 Camera 对象是: import android.graphics.Camera;而应该是:import android.hardware.Camera;
import android.graphics.Camera;
import android.hardware.Camera;