This error is related to calling camera cameras.
The main reason for this error is that the display of the code control resolution is not the same as the real machine test resolution.
One: Solutions
WindowManager wm = (WindowManager) getsystemservice (context.window_service);D isplay Display = Wm.getdefaultdisplay (); Camera.parameters Parameters = camera.getparameters ()///Get Camera Parameters Parameters.setpreviewsize (Display.getwidth (), Display.getheight ()); Comment out these two sentences parameters.setpicturesize (Display.getheight (), Display.getwidth ()); Comment out these two sentences
Two: It is possible that your real machine is a custom machine, or the depth of development, the camera to a lot of changes.
Camera.setparameters (parameters);//cause you can't use this method, comment out the line.
But in this case, the set of some parameters can not be used, the current has not been resolved, seeking master enlighten.
Real Machine Test error error/androidruntime (1805): Java.lang.Runtim