[Nexus One Android Development] blue0sky:
CameraPreview.java Example(Anroid SDK 2.0) not working......

I'm trying to program my camera application on Nexus One,

But the example code of android sdk 2.0 isn't working.

The example source is the CamraPreview.java.

Maybe, the preview size is the problem but I don't know how to fix the problem.

I include the log of CameraView.java on Nexus One.

If anybody has the information about this problem, please let me know that.

Thanks in advance.

========> The log of CameraPreview.java on Nexus One

E/QualcommCameraHardware( 52): Invalid preview size requested: 533x295

I/QualcommCameraHardware( 52): Set zoom=0

D/AndroidRuntime( 2551): Shutting down VM

W/dalvikvm( 2551): threadid=3: thread exiting with uncaught exception (group=0x4001b180)

E/AndroidRuntime( 2551): Uncaught handler: thread main exiting due to uncaught exception

E/AndroidRuntime( 2551): java.lang.RuntimeException: setParameters failed

E/AndroidRuntime( 2551): at android.hardware.Camera.native_setParameters(Native Method)

E/AndroidRuntime( 2551): at android.hardware.Camera.setParameters(Camera.java:619)

E/AndroidRuntime( 2551): at com.example.android.apis.graphics.Preview.surfaceChanged(CameraPreview.java:90)

E/AndroidRuntime( 2551): at android.view.SurfaceView.updateWindow(SurfaceView.java:460)

E/AndroidRuntime( 2551): at android.view.SurfaceView.dispatchDraw(SurfaceView.java:287)

E/AndroidRuntime( 2551): at android.view.ViewGroup.drawChild(ViewGroup.java:1529)

E/AndroidRuntime( 2551): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)

E/AndroidRuntime( 2551): at android.view.View.draw(View.java:6538)

E/AndroidRuntime( 2551): at android.widget.FrameLayout.draw(FrameLayout.java:352)

E/AndroidRuntime( 2551): at android.view.ViewGroup.drawChild(ViewGroup.java:1531)

E/AndroidRuntime( 2551): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)

E/AndroidRuntime( 2551): at android.view.View.draw(View.java:6538)

E/AndroidRuntime( 2551): at android.widget.FrameLayout.draw(FrameLayout.java:352)

E/AndroidRuntime( 2551): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1830)

E/AndroidRuntime( 2551): at android.view.ViewRoot.draw(ViewRoot.java:1349)

E/AndroidRuntime( 2551): at android.view.ViewRoot.performTraversals(ViewRoot.java:1114)

E/AndroidRuntime( 2551): at android.view.ViewRoot.handleMessage(ViewRoot.java:1633)

E/AndroidRuntime( 2551): at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 2551): at android.os.Looper.loop(Looper.java:123)

E/AndroidRuntime( 2551): at android.app.ActivityThread.main(ActivityThread.java:4363)

E/AndroidRuntime( 2551): at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 2551): at java.lang.reflect.Method.invoke(Method.java:521)

E/AndroidRuntime( 2551): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)

E/AndroidRuntime( 2551): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

E/AndroidRuntime( 2551): at dalvik.system.NativeStart.main(Native Method)

I/Process ( 74): Sending signal. PID: 2551 SIG: 3

I/dalvikvm( 2551): threadid=7: reacting to signal 3

I/dalvikvm( 2551): Wrote stack trace to '/data/anr/traces.txt'

I/Process ( 2551): Sending signal. PID: 2551 SIG: 9

E/JavaBinder( 74): !!! FAILED BINDER TRANSACTION !!!