5

In Android SDK and AVD Manager, I created a new android virtual device as following:

  • Name: myavd
  • Target: Android 2.2 - API Level 8.
  • SD Card: 50MiB.
  • Build-in: Default (HVGA).
  • Hardware: Abstracted LCD density 160.

After starting this device, I can't take a picture from build-in camera. The following is the error and exception.

The application Camera (process com.android.camera) has stopped unexpectedly. Please try again.

08-18 15:00:47.940: ERROR/AndroidRuntime(289): FATAL EXCEPTION: GLThread 11 08-18 15:00:47.940: ERROR/AndroidRuntime(289): java.lang.IllegalArgumentException: No configs match configSpec 08-18 15:00:47.940: ERROR/AndroidRuntime(289): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:760) 08-18 15:00:47.940: ERROR/AndroidRuntime(289): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:916) 08-18 15:00:47.940: ERROR/AndroidRuntime(289): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1246) 08-18 15:00:47.940: ERROR/AndroidRuntime(289): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116) 08-18 15:00:48.369: WARN/ActivityManager(66): Force finishing activity com.android.camera/.Camera

Do you know what is wrong ?

rekire
  • 47,260
  • 30
  • 167
  • 264
user423715
  • 141
  • 1
  • 1
  • 3
  • 2
    emulator 2.2 is broken. Please vote for this: http://code.google.com/p/android/issues/detail?id=9376 so we can get a fix – user77115 Aug 13 '11 at 10:02

3 Answers3

6

It seems that this is normal behaviour. check here.
The emulator does not seem to support camera. Here are these limitations :

Emulator Limitations

In this release, the limitations of the emulator include:

* No support for placing or receiving actual phone calls. You can simulate phone calls (placed and received) through the emulator console, however.
* No support for USB connections
* No support for camera/video capture (input).
* No support for device-attached headphones
* No support for determining connected state
* No support for determining battery charge level and AC charging state
* No support for determining SD card insert/eject
* No support for Bluetooth
Sephy
  • 50,022
  • 30
  • 123
  • 131
  • 1
    Thanks for your answer. But it has worked on Android 2.1 and lower, don't know why the issue happens on android 2.2 :( – user423715 Aug 18 '10 at 09:37
  • That is weird indeed, I do have the same issue. I'll make some research and post back here if I find something interesting – Sephy Aug 18 '10 at 09:53
  • In emulator 1.6 the default Android image was returned from the built in Camera activity, which was fine for various testing. In emulator 2.2 you get an exception instead. I consider this a bug in the emulator. – user77115 Aug 13 '11 at 09:50
2

What is wrong: emulator 2.2 is broken.

Workaround: Create an AVD with 2.1 as the target.

user77115
  • 5,517
  • 6
  • 37
  • 40
1

Have a look at my answer here. Camera crashes in Android 2.2. You might not be detecting the available preview sizes correctly.

Community
  • 1
  • 1
Abhinav
  • 38,516
  • 9
  • 41
  • 49