tags:

views:

171

answers:

2

Hi,

I'm using the example from the SDK (CameraPreview) and also the example from this site http://marakana.com/forums/android/android_examples/39.html

When I run it, both gives this error "The application AppName(appname) has stopped unexpectedly. Please try again".
I can't run the debugger either because it's always "Waiting for debugger. Force close". (I have debuggable=true in the manifest file)

The phone I have is a Nexus One.
Running on the emulator gives me the black and white squares with a moving square. (So I assume it works on the emulator?). Even on the emulator it gives me the "stopped unexpectedly" error 50% of the time.

Does anyone know what caused it?

Thanks,
Tee

A: 

To see what the actual Exception is (plus it's path trace) you need to execute adb logcat.

To run the debugger, you simply wait 'till the "Waiting for debugger. Force close" dialog disappears.

MrSnowflake
A: 

Ok, my debugger decided to work again now.

Traced it down to this line. camera.setParameters(parameters);
That piece of code somehow killed the app.

Looks like you need to check it by getSupportedPictureSizes first before setting the parameter.(I have yet to try this part tho).

teepusink