仿真器上的假相机无法使用Intellij Idea

时间:2014-11-25 18:54:49

标签: android intellij-idea emulation

我在模拟器上安装了相机应用程序时出现问题。每当我想要发射相机时,我都会遇到如此讨厌的事情。使用Intellij Idea(最新版本)我创建了包含两个相机的新硬件,而不是这些作品。我知道下面打印的错误,但我不知道如何解决它(特别是在使用拍摄照片开发应用程序时,这会让我受伤)。 我应该怎么做才能使用假相机并捕捉模拟器中产生的假相机功能?

11-25 13:31:12.527: E/CameraService(927): CameraService::connect X (pid 2426) rejected (invalid cameraId 0).
11-25 13:31:12.527: W/CameraBase(2426): An error occurred while connecting to camera: 0
11-25 13:31:12.527: E/CameraHolder(2426): fail to connect Camera
11-25 13:31:12.527: E/CameraHolder(2426): java.lang.RuntimeException: Fail to connect to camera service
11-25 13:31:12.527: E/CameraHolder(2426):   at android.hardware.Camera.native_setup(Native Method)
11-25 13:31:12.527: E/CameraHolder(2426):   at android.hardware.Camera.<init>(Camera.java:350)
11-25 13:31:12.527: E/CameraHolder(2426):   at android.hardware.Camera.open(Camera.java:309)
11-25 13:31:12.527: E/CameraHolder(2426):   at com.android.camera.CameraHolder.open(CameraHolder.java:131)
11-25 13:31:12.527: E/CameraHolder(2426):   at com.android.camera.Util.openCamera(Util.java:267)
11-25 13:31:12.527: E/CameraHolder(2426):   at com.android.camera.Camera$4.run(Camera.java:1100)
11-25 13:31:12.527: E/CameraHolder(2426):   at java.lang.Thread.run(Thread.java:841)
11-25 13:31:12.527: W/dalvikvm(2426): threadid=11: thread exiting with uncaught exception (group=0xb1d37b20)
11-25 13:31:12.527: E/AndroidRuntime(2426): FATAL EXCEPTION: Thread-93
11-25 13:31:12.527: E/AndroidRuntime(2426): Process: com.android.camera, PID: 2426
11-25 13:31:12.527: E/AndroidRuntime(2426): java.lang.RuntimeException: openCamera failed
11-25 13:31:12.527: E/AndroidRuntime(2426):     at com.android.camera.Util.openCamera(Util.java:272)
11-25 13:31:12.527: E/AndroidRuntime(2426):     at com.android.camera.Camera$4.run(Camera.java:1100)
11-25 13:31:12.527: E/AndroidRuntime(2426):     at java.lang.Thread.run(Thread.java:841)
11-25 13:31:12.527: E/AndroidRuntime(2426): Caused by: com.android.camera.CameraHardwareException: java.lang.RuntimeException: Fail to connect to camera service
11-25 13:31:12.527: E/AndroidRuntime(2426):     at com.android.camera.CameraHolder.open(CameraHolder.java:135)
11-25 13:31:12.527: E/AndroidRuntime(2426):     at com.android.camera.Util.openCamera(Util.java:267)
11-25 13:31:12.527: E/AndroidRuntime(2426):     ... 2 more
11-25 13:31:12.527: E/AndroidRuntime(2426): Caused by: java.lang.RuntimeException: Fail to connect to camera service
11-25 13:31:12.527: E/AndroidRuntime(2426):     at android.hardware.Camera.native_setup(Native Method)
11-25 13:31:12.527: E/AndroidRuntime(2426):     at android.hardware.Camera.<init>(Camera.java:350)
11-25 13:31:12.527: E/AndroidRuntime(2426):     at android.hardware.Camera.open(Camera.java:309)
11-25 13:31:12.527: E/AndroidRuntime(2426):     at com.android.camera.CameraHolder.open(CameraHolder.java:131)
11-25 13:31:12.527: E/AndroidRuntime(2426):     ... 3 more
11-25 13:31:12.557: W/ActivityManager(1261):   Force finishing activity com.android.camera/.Camera
11-25 13:31:12.567: D/dalvikvm(2426): GC_FOR_ALLOC freed 212K, 8% free 3387K/3680K, paused 6ms, total 7ms
11-25 13:31:12.567: E/gralloc_goldfish(924): gralloc_alloc: Mismatched usage flags: 492 x 874, usage 333
11-25 13:31:12.567: W/GraphicBufferAllocator(924): alloc(492, 874, 1, 00000333, ...) failed -22 (Invalid argument)
11-25 13:31:12.567: E/(924): GraphicBufferAlloc::createGraphicBuffer(w=492, h=874) failed (Invalid argument), handle=0x0
11-25 13:31:12.567: E/BufferQueue(1261): [ScreenshotClient] dequeueBuffer: SurfaceComposer::createGraphicBuffer failed
11-25 13:31:12.567: W/WindowManager(1261): Screenshot failure taking screenshot for (492x874) to layer 21010
11-25 13:31:12.607: D/dalvikvm(2426): GC_FOR_ALLOC freed 18K, 7% free 3570K/3836K, paused 2ms, total 2ms
11-25 13:31:12.607: I/dalvikvm-heap(2426): Grow heap (frag case) to 4.978MB for 1490412-byte allocation
11-25 13:31:12.637: D/dalvikvm(2426): GC_FOR_ALLOC freed 2K, 6% free 5023K/5292K, paused 17ms, total 17ms
11-25 13:31:12.667: D/dalvikvm(2426): GC_FOR_ALLOC freed 14K, 5% free 5444K/5692K, paused 3ms, total 3ms
11-25 13:31:12.677: D/dalvikvm(2426): GC_FOR_ALLOC freed 9K, 5% free 5768K/6012K, paused 4ms, total 5ms
11-25 13:31:12.687: D/dalvikvm(2426): GC_FOR_ALLOC freed 3K, 4% free 6446K/6688K, paused 4ms, total 4ms
11-25 13:31:13.087: W/ActivityManager(1261): Activity pause timeout for ActivityRecord{b27fac48 u0 com.android.camera/.Camera t7 f}
11-25 13:31:13.127: W/EGL_emulation(1415): eglSurfaceAttrib not implemented
11-25 13:31:22.217: E/WindowManager(1261): Starting window AppWindowToken{b27ff320 token=Token{b27fada8 ActivityRecord{b27fac48 u0 com.android.camera/.Camera t7}}} timed out
11-25 13:31:23.197: W/ActivityManager(1261): Activity destroy timeout for ActivityRecord{b27fac48 u0 com.android.camera/.Camera t7 f}
11-25 13:31:41.508: I/Process(2426): Sending signal. PID: 2426 SIG: 9
11-25 13:31:41.508: I/ActivityManager(1261): Process com.android.camera (pid 2426) has died.
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/KeypressStandard.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/KeypressSpacebar.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/KeypressDelete.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/KeypressReturn.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/KeypressInvalid.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
11-25 13:31:41.528: W/AudioService(1261): onLoadSoundEffects(), Error -1 while loading samples
11-25 13:31:41.528: W/InputMethodManagerService(1261): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@b2882de8 attribute=null, token = android.os.BinderProxy@b23d9688
11-25 13:34:01.090: D/dalvikvm(1261): GC_FOR_ALLOC freed 1204K, 11% free 10400K/11684K, paused 15ms, total 16ms
11-25 13:38:44.164: D/dalvikvm(1400): GC_FOR_ALLOC freed 541K, 15% free 3672K/4284K, paused 10ms, total 21ms

0 个答案:

没有答案