當我試圖打開攝像頭應用程序在模擬器defaultly給出,它意外停止和logcat的顯示爲什麼dafault相機無法在android模擬器中工作?
02-08 11:18:35.005: INFO/ActivityManager(83): Starting activity: Intent {act= android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp= com.android.camera/.Camera }
02-08 11:18:35.085: INFO/ActivityManager(83): Start proc com.android.camera for activity com.android.camera/.Camera: pid=580 uid=10006 gids={1006, 1015}
02-08 11:18:35.385: INFO/WindowManager(83): Setting rotation to 1, animFlags=1
02-08 11:18:35.395: INFO/ActivityManager(83): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=3/1 orien=2 layout=18 uiMode=17 seq=11}
02-08 11:18:35.845: DEBUG/CameraHardwareStub(34): initHeapLocked: preview size=320x240
02-08 11:18:35.895: DEBUG/Camera(580): app passed NULL surface
02-08 11:18:35.925: DEBUG/CameraHardwareStub(34): initHeapLocked: preview size=320x240
02-08 11:18:35.925: VERBOSE/camera(580): startPreview
02-08 11:18:36.005: INFO/ActivityManager(83): Displayed activity com.android.camera/.Camera: 932 ms (total 932 ms)
02-08 11:18:36.375: DEBUG/qemud(38): fdhandler_accept_event: accepting on fd 10
02-08 11:18:36.375: DEBUG/qemud(38): created client 0x17fc8 listening on fd 15
02-08 11:18:36.375: DEBUG/qemud(38): client_fd_receive: attempting registration for service 'sensors'
02-08 11:18:36.375: DEBUG/qemud(38): client_fd_receive: -> received channel id 11
02-08 11:18:36.450: DEBUG/qemud(38): client_registration: registration succeeded for client 11
02-08 11:18:36.495: DEBUG/qemud(38): fdhandler_event: disconnect on fd 15
02-08 11:18:36.995: DEBUG/dalvikvm(580): GC_EXTERNAL_ALLOC freed 1975 objects/129904 bytes in 182ms
02-08 11:18:37.355: DEBUG/libEGL(580): egl.cfg not found, using default config
02-08 11:18:37.355: DEBUG/libEGL(580): loaded /system/lib/egl/libGLES_android.so
02-08 11:18:37.445: WARN/dalvikvm(580): threadid=9: thread exiting with uncaught exception (group=0x4001d800)
02-08 11:18:37.445: ERROR/AndroidRuntime(580): FATAL EXCEPTION: GLThread 11
02-08 11:18:37.445: ERROR/AndroidRuntime(580): java.lang.IllegalArgumentException: No configs match configSpec
02-08 11:18:37.445: ERROR/AndroidRuntime(580): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:760)
02-08 11:18:37.445: ERROR/AndroidRuntime(580): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:916)
02-08 11:18:37.445: ERROR/AndroidRuntime(580): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1246)
02-08 11:18:37.445: ERROR/AndroidRuntime(580): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
02-08 11:18:37.475: WARN/ActivityManager(83): Force finishing activity com.android.camera/.Camera
02-08 11:18:37.515: VERBOSE/camera(580): stopPreview
02-08 11:18:37.755: DEBUG/dalvikvm(83): GC_EXPLICIT freed 2789 objects/135064 bytes in 137ms
02-08 11:18:37.765: INFO/WindowManager(83): Setting rotation to 0, animFlags=1
02-08 11:18:37.839: INFO/ActivityManager(83): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=3/1 orien=1 layout=18 uiMode=17 seq=12}
02-08 11:18:38.045: WARN/ActivityManager(83): Activity pause timeout for HistoryRecord{44f5db08 com.android.camera/.Camera}
02-08 11:18:40.555: DEBUG/dalvikvm(83): GC_EXPLICIT freed 986 objects/59472 bytes in 131ms
02-08 11:18:41.985: INFO/Process(580): Sending signal. PID: 580 SIG: 9
02-08 11:18:42.005: INFO/WindowManager(83): WIN DEATH: Window{44ed4e48 SurfaceView paused=false}
02-08 11:18:42.005: INFO/ActivityManager(83): Process com.android.camera (pid 580) has died.
02-08 11:18:42.005: INFO/WindowManager(83): WIN DEATH: Window{44ff9fd0 com.android.camera/com.android.camera.Camera paused=false}
02-08 11:18:42.015: INFO/WindowManager(83): WIN DEATH: Window{45003ef8 SurfaceView paused=false}
02-08 11:18:42.095: WARN/InputManagerService(83): Got RemoteException sending setActive(false) notification to pid 580 uid 10006
02-08 11:18:43.805: DEBUG/dalvikvm(260): GC_EXPLICIT freed 2114 objects/96480 bytes in 146ms
02-08 11:18:48.623: WARN/ActivityManager(83): Activity destroy timeout for HistoryRecord{44f5db08 com.android.camera/.Camera}
我無法理解的錯誤拋出:IllegalArgumentException:沒有CONFIGS匹配configSpec。我是否需要一些額外的配置來打開相機,但我已經在模擬器中配置了SD卡。
要找到解決方案,我看到這個問題的一些答案是,相機總是這樣工作,所以我們不應該使用這個。如果這是正確的,我應該用什麼來開發相機應用程序?
我在使用相機時使用真實設備。主要是運行薑餅的Nexus One。 – Sparky 2012-02-08 06:18:13
請檢查2.1模擬器,它正在對 – Rishi 2012-02-08 06:25:26