«java.lang.IllegalArgumentException: конфигурация не соответствует configSpec» при открытии намерения камеры

Это моя простая демонстрация намерений камеры, в которой у меня есть только одно Activity .....

package x.y;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.widget.ImageView;
public class PhotoShoot extends Activity {
    final static int CAMERA_RESULT = 0;
    ImageView imv;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
        startActivityForResult(i, CAMERA_RESULT);
    }
    protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
        super.onActivityResult(requestCode, resultCode, intent);
        if (resultCode == RESULT_OK)
        {
            Bundle extras = intent.getExtras();
            Bitmap bmp = (Bitmap) extras.get("data");
            imv = (ImageView) findViewById(R.id.ReturnedImageView);
            imv.setImageBitmap(bmp);
        }
    }
}

и Layout main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <ImageView 
        android:id="@+id/ReturnedImageView"
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content">
    </ImageView>
</LinearLayout>

Manifest ...

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="x.y"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".PhotoShoot"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest> 

Throwing "Force close " через несколько секунд в эмуляторе Android 2.2 от запуска намерения камеры со следующим исключением ...

07-06 15:26:00.999: ERROR/AndroidRuntime(544): FATAL EXCEPTION: GLThread 11
07-06 15:26:00.999: ERROR/AndroidRuntime(544): java.lang.IllegalArgumentException: No configs match configSpec
07-06 15:26:00.999: ERROR/AndroidRuntime(544): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:760)
07-06 15:26:00.999: ERROR/AndroidRuntime(544): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:916)
07-06 15:26:00.999: ERROR/AndroidRuntime(544): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1246)
07-06 15:26:00.999: ERROR/AndroidRuntime(544): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)

есть идеи?

14
задан Vaibhav Jani 6 July 2011 в 10:53
поделиться