Solucionado (ver solução)
Solucionado
(ver solução)
3
respostas

Unfortunately, Camera has stopped

Olá a todos. Estou acompanhando as vídeo aulas que tratam de tirar a foto de um aluno para a lista de alunos... Meu código está igual ao do vídeo. Quando clico no botão da camera recebo: Unfortunately, Camera has stopped. Estou usando um emulador 5554:Nexus_6_API_19.

Alguém pode me ajudar?

3 respostas

Oi Marcelo, tudo bem ?

Manda o erro que está acontecendo, você consegue pegar no logcat. E manda também o código que você está disparando a activity.

Abraços :D

Olá Mateus.

Olha só, vou explicar o que fiz hoje mais cedo, e o problema mudou:

Por dentro do Android Studio acessei as configurações do meu emulador: Tools - Android - AVD Manager - Edit (lápis) - Show Advanced Settings (Botão).

Na opção Câmera fiz o seguinte: Câmera: Escolhi as opções "Emulated" para as opções Front e Back.

Salvei, saí do AVD Manager e em seguida reiniciei o emulador. Após isso não recebi mais o erro que reportei ontem. Porém, quando acesso a câmera (mesmo de fora da aplicação que estou fazendo) a imagem não captura normalmente, fica zoado, com uma tela xadrez ao fundo e um quadrado andando de um lado pra outro. (A impressão que tive é que agora tá faltando mais alguma configuração que ainda não encontrei pra poder tirar uma foto).

Agora vou printar o pedaço do log do logCat quando clico no botão que chama a câmera por dentro do aplicativo e por fim o trecho de código que invoca a câmera:

07-31 21:56:29.565 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:29.565 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:29.565 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:29.565 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:29.565 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:29.565 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:29.565 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:29.565 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:29.565 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:29.565 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:29.565 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/KeypressStandard.ogg 07-31 21:56:29.565 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg 07-31 21:56:29.565 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/KeypressSpacebar.ogg 07-31 21:56:29.565 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg 07-31 21:56:29.565 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/KeypressDelete.ogg 07-31 21:56:29.565 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg 07-31 21:56:29.565 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/KeypressReturn.ogg 07-31 21:56:29.565 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg 07-31 21:56:29.565 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/KeypressInvalid.ogg 07-31 21:56:29.565 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg 07-31 21:56:29.565 1622-1696/system_process W/AudioService: onLoadSoundEffects(), Error -1 while loading samples 07-31 21:56:29.565 1622-1722/system_process I/ActivityManager: START u0 {act=android.media.action.IMAGE_CAPTURE cmp=com.android.camera/.Camera (has extras)} from pid 2395 07-31 21:56:29.575 1622-1633/system_process I/ActivityManager: Start proc com.android.camera for activity com.android.camera/.Camera: pid=6743 uid=10031 gids={50031, 1028, 1015}

[ 07-31 21:56:29.605 1132: 1947 D/ ] HostConnection::get() New Host Connection established 0xb9543f60, tid 1947 07-31 21:56:30.045 1135-1698/? V/EmulatedCamera_Camera: getCameraInfo 07-31 21:56:30.045 1135-1698/? V/EmulatedCamera_BaseCamera: getCameraInfo 07-31 21:56:30.045 1135-1135/? V/EmulatedCamera_Camera: getCameraInfo 07-31 21:56:30.045 1135-1135/? V/EmulatedCamera_BaseCamera: getCameraInfo 07-31 21:56:30.045 6743-6765/com.android.camera V/CameraHolder: open camera 1 07-31 21:56:30.045 1135-1562/? V/EmulatedCamera_Camera: getCameraInfo 07-31 21:56:30.045 1135-1562/? V/EmulatedCamera_BaseCamera: getCameraInfo 07-31 21:56:30.045 1135-1562/? V/EmulatedCamera_Camera: getCameraInfo 07-31 21:56:30.045 1135-1562/? V/EmulatedCamera_BaseCamera: getCameraInfo 07-31 21:56:30.045 1135-1562/? I/AwesomePlayer: setDataSource_l(URL suppressed) 07-31 21:56:30.045 1135-1562/? E/cutils-trace: Error opening trace file: Permission denied (13) 07-31 21:56:30.135 1135-6767/? E/WVMExtractor: Failed to open libwvm.so 07-31 21:56:30.185 1135-1562/? I/AwesomePlayer: setDataSource_l(URL suppressed) 07-31 21:56:30.205 1135-1562/? I/CameraClient: Opening camera 1 07-31 21:56:30.205 1135-1562/? V/EmulatedCamera_Camera: connectCamera 07-31 21:56:30.205 1135-1562/? V/EmulatedCamera_FakeDevice: connectDevice 07-31 21:56:30.205 1135-1562/? V/EmulatedCamera_CallbackNotifier: setCallbacks: 0xb6dd7620, 0xb6dd7f70, 0xb6dd8090, 0xb6ddac80 (0xb83b3200) 07-31 21:56:30.205 1135-1562/? V/EmulatedCamera_CallbackNotifier: enableMessage: msg_type = 0xc0d 07-31 21:56:30.205 1135-1562/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_ERROR 07-31 21:56:30.205 1135-1562/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_FOCUS 07-31 21:56:30.205 1135-1562/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_ZOOM 07-31 21:56:30.205 1135-1562/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_PREVIEW_METADATA 07-31 21:56:30.205 1135-1562/? V/EmulatedCamera_CallbackNotifier: ** Currently enabled messages: 07-31 21:56:30.205 1135-1562/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_ERROR 07-31 21:56:30.205 1135-1562/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_FOCUS 07-31 21:56:30.205 1135-1562/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_ZOOM 07-31 21:56:30.205 1135-1562/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_PREVIEW_METADATA 07-31 21:56:30.515 6743-6743/com.android.camera D/dalvikvm: GC_FOR_ALLOC freed 187K, 7% free 3615K/3880K, paused 73ms, total 74ms 07-31 21:56:30.575 6743-6743/com.android.camera D/dalvikvm: GC_FOR_ALLOC freed 18K, 6% free 3885K/4108K, paused 2ms, total 2ms 07-31 21:56:30.585 6743-6743/com.android.camera I/dalvikvm-heap: Grow heap (frag case) to 5.801MB for 2031132-byte allocation 07-31 21:56:30.585 6743-6752/com.android.camera D/dalvikvm: GC_FOR_ALLOC freed 2K, 4% free 5867K/6092K, paused 5ms, total 5ms 07-31 21:56:30.615 6743-6743/com.android.camera D/dalvikvm: GC_FOR_ALLOC freed 15K, 4% free 6434K/6652K, paused 3ms, total 3ms 07-31 21:56:30.625 6743-6743/com.android.camera D/dalvikvm: GC_FOR_ALLOC freed 9K, 3% free 6874K/7084K, paused 3ms, total 3ms 07-31 21:56:30.635 6743-6743/com.android.camera D/dalvikvm: GC_FOR_ALLOC freed 3K, 3% free 7906K/8116K, paused 3ms, total 4ms 07-31 21:56:30.645 6743-6782/com.android.camera D/Camera: app passed NULL surface 07-31 21:56:30.645 1135-1562/? V/EmulatedCamera_Camera: getCameraInfo 07-31 21:56:30.645 1135-1562/? V/EmulatedCamera_BaseCamera: getCameraInfo 07-31 21:56:30.655 6743-6782/com.android.camera V/camera: Preview size is 640x480 07-31 21:56:30.655 1135-1135/? V/EmulatedCamera_Camera: setParameters 07-31 21:56:30.655 1135-1135/? D/EmulatedCamera_Camera: === Value changed: jpeg-quality: 90 -> 95 07-31 21:56:30.655 1135-1135/? D/EmulatedCamera_Camera: === Value changed: preview-frame-rate: 24 -> 30 07-31 21:56:30.655 1135-1135/? D/EmulatedCamera_Camera: +++ New parameter: recording-hint=false 07-31 21:56:30.655 6743-6782/com.android.camera V/camera: startPreview 07-31 21:56:30.655 1135-1562/? V/EmulatedCamera_Preview: setPreviewWindow: current: 0x0 -> new: 0x0 07-31 21:56:30.655 1135-1562/? V/EmulatedCamera_Camera: doStartPreview 07-31 21:56:30.655 1135-1562/? V/EmulatedCamera_Preview: startPreview 07-31 21:56:30.655 1135-1562/? D/EmulatedCamera_Camera: Starting camera: 640x480 -> NV21(yuv420sp) 07-31 21:56:30.655 1135-1562/? V/EmulatedCamera_FakeDevice: startDevice 07-31 21:56:30.655 1135-1562/? V/EmulatedCamera_Device: commonStartDevice: Allocated 0xb53c2010 460800 bytes for 307200 pixels in NV21[640x480] frame 07-31 21:56:30.655 1135-1562/? V/EmulatedCamera_Device: startDeliveringFrames 07-31 21:56:30.655 1135-1562/? V/EmulatedCamera_Device: startWorkerThread 07-31 21:56:30.665 1135-6783/? V/EmulatedCamera_Device: Starting emulated camera device worker thread... 07-31 21:56:30.665 1135-6783/? V/EmulatedCamera_Device: Emulated device's worker thread has been started. 07-31 21:56:30.675 6743-6743/com.android.camera D/dalvikvm: GC_FOR_ALLOC freed 105K, 2% free 9321K/9500K, paused 4ms, total 4ms 07-31 21:56:30.685 6743-6743/com.android.camera D/dalvikvm: GC_FOR_ALLOC freed 6K, 2% free 9615K/9800K, paused 3ms, total 3ms 07-31 21:56:30.685 6743-6743/com.android.camera I/dalvikvm-heap: Grow heap (frag case) to 12.755MB for 3456696-byte allocation 07-31 21:56:30.695 6743-6752/com.android.camera D/dalvikvm: GC_FOR_ALLOC freed <1K, 2% free 12990K/13176K, paused 6ms, total 6ms

[ 07-31 21:56:30.765 6743: 6743 D/ ] HostConnection::get() New Host Connection established 0xb97db430, tid 6743 07-31 21:56:30.895 6743-6743/com.android.camera D/OpenGLRenderer: Enabling debug mode 0 07-31 21:56:30.915 6743-6743/com.android.camera V/camera: surfaceChanged. w=1440. h=1920 07-31 21:56:30.915 1135-1697/? V/EmulatedCamera_Preview: setPreviewWindow: current: 0x0 -> new: 0xb83b3210 07-31 21:56:30.915 1135-6783/? V/EmulatedCamera_Preview: onNextFrameAvailable: Adjusting preview windows 0xb83b3210 geometry to 640x480

[ 07-31 21:56:30.945 1135: 6783 D/ ] HostConnection::get() New Host Connection established 0xb83c76e0, tid 6783 07-31 21:56:31.745 1622-1638/system_process I/ActivityManager: Displayed com.android.camera/.Camera: +2s171ms 07-31 21:56:31.745 2395-2395/br.com.mheitor.agenda W/IInputConnectionWrapper: showStatusIcon on inactive InputConnection 07-31 21:56:31.745 6743-6743/com.android.camera D/LocationManager: provider does not exist provider doesn't exist: gps 07-31 21:56:31.745 6743-6743/com.android.camera D/LocationManager: startReceivingLocationUpdates 07-31 21:56:31.745 6743-6743/com.android.camera D/CameraStorage: External storage state=mounted 07-31 21:56:35.845 2153-6857/com.google.android.gms D/DropBoxEntryAddedChimeraService: User is not opted-in to Usage & Diagnostics. 07-31 21:56:58.325 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:58.325 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:58.325 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:58.325 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:58.325 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:58.325 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:58.325 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:58.325 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:58.325 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:58.325 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg 07-31 21:56:58.325 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/KeypressStandard.ogg 07-31 21:56:58.325 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg 07-31 21:56:58.325 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/KeypressSpacebar.ogg 07-31 21:56:58.325 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg 07-31 21:56:58.325 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/KeypressDelete.ogg 07-31 21:56:58.325 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg 07-31 21:56:58.325 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/KeypressReturn.ogg 07-31 21:56:58.325 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg 07-31 21:56:58.325 1622-1696/system_process E/SoundPool: error loading /system/media/audio/ui/KeypressInvalid.ogg 07-31 21:56:58.325 1622-1696/system_process W/AudioService: Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg 07-31 21:56:58.325 1622-1696/system_process W/AudioService: onLoadSoundEffects(), Error -1 while loading samples 07-31 21:56:58.385 6743-6743/com.android.camera V/camera: stopPreview 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_Camera: cancelAutoFocus 07-31 21:56:58.385 1135-1562/? V/EmulatedCamera_CallbackNotifier: disableMessage: msg_type = 0x10 07-31 21:56:58.385 1135-1562/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_PREVIEW_FRAME 07-31 21:56:58.385 1135-1562/? V/EmulatedCamera_CallbackNotifier: Currently enabled messages: 07-31 21:56:58.385 1135-1562/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_ERROR 07-31 21:56:58.385 1135-1562/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_FOCUS 07-31 21:56:58.385 1135-1562/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_ZOOM 07-31 21:56:58.385 1135-1562/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_PREVIEW_METADATA 07-31 21:56:58.385 1135-1562/? V/EmulatedCamera_Camera: doStopPreview 07-31 21:56:58.385 1135-1562/? V/EmulatedCamera_Device: stopDeliveringFrames 07-31 21:56:58.385 1135-1562/? V/EmulatedCamera_Device: stopWorkerThread 07-31 21:56:58.385 1135-1562/? V/EmulatedCamera_Device: Stopping emulated camera device's worker thread... 07-31 21:56:58.385 1135-6783/? V/EmulatedCamera_Device: Select: THREAD_STOP message is received 07-31 21:56:58.385 1135-6783/? V/EmulatedCamera_FakeDevice: inWorkerThread: Worker thread has been terminated. 07-31 21:56:58.385 1135-1562/? V/EmulatedCamera_Device: Emulated camera device's worker thread has been stopped. 07-31 21:56:58.385 1135-1562/? V/EmulatedCamera_FakeDevice: stopDevice 07-31 21:56:58.385 1135-1562/? V/EmulatedCamera_Preview: stopPreview 07-31 21:56:58.385 1135-1697/? V/EmulatedCamera_CallbackNotifier: disableMessage: msg_type = 0x10 07-31 21:56:58.385 1135-1697/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_PREVIEW_FRAME 07-31 21:56:58.385 1135-1697/? V/EmulatedCamera_CallbackNotifier: Currently enabled messages: 07-31 21:56:58.385 1135-1697/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_ERROR 07-31 21:56:58.385 1135-1697/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_FOCUS 07-31 21:56:58.385 1135-1697/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_ZOOM 07-31 21:56:58.385 1135-1697/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_PREVIEW_METADATA 07-31 21:56:58.385 1135-1697/? V/EmulatedCamera_Camera: doStopPreview 07-31 21:56:58.385 1135-1698/? V/EmulatedCamera_CallbackNotifier: disableMessage: msg_type = 0x10 07-31 21:56:58.385 1135-1698/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_PREVIEW_FRAME 07-31 21:56:58.385 1135-1698/? V/EmulatedCamera_CallbackNotifier: Currently enabled messages: 07-31 21:56:58.385 1135-1698/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_ERROR 07-31 21:56:58.385 1135-1698/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_FOCUS 07-31 21:56:58.385 1135-1698/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_ZOOM 07-31 21:56:58.385 1135-1698/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_PREVIEW_METADATA 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_CallbackNotifier: disableMessage: msg_type = 0xffff 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_ERROR 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_SHUTTER 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_FOCUS 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_ZOOM 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_PREVIEW_FRAME 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_VIDEO_FRAME 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_POSTVIEW_FRAME 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_RAW_IMAGE 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_COMPRESSED_IMAGE 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_RAW_IMAGE_NOTIFY 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_CallbackNotifier: CAMERA_MSG_PREVIEW_METADATA 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_CallbackNotifier: Currently enabled messages: 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_Camera: doStopPreview 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_Camera: cancelPicture 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_Camera: releaseCamera 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_Camera: doStopPreview 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_FakeDevice: disconnectDevice

[ 07-31 21:56:58.385 1135: 1135 D/ ] HostConnection::get() New Host Connection established 0xb83c79c0, tid 1135 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_Preview: setPreviewWindow: current: 0xb83b3210 -> new: 0x0 07-31 21:56:58.385 1135-1135/? I/CameraClient: Destroying camera 1 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_Camera: closeCamera 07-31 21:56:58.385 1135-1135/? V/EmulatedCamera_Camera: doStopPreview 07-31 21:56:58.395 6743-6743/com.android.camera D/LocationManager: stopReceivingLocationUpdates 07-31 21:57:01.155 1622-1639/system_process I/ActivityManager: Killing 2061:com.android.music/u0a35 (adj 15): empty #17 07-31 21:57:01.215 1622-1881/system_process W/MediaFocusControl: RemoteControlClient died 07-31 22:03:45.035 1622-1689/system_process D/ConnectivityService: Sampling interval elapsed, updating statistics .. 07-31 22:03:45.035 1622-1689/system_process D/ConnectivityService: Done. 07-31 22:03:45.035 1622-1689/system_process D/ConnectivityService: Setting timer for 720seconds 07-31 22:08:05.005 1622-1639/system_process W/ProcessCpuTracker: Skipping unknown process pid 16787 07-31 22:08:25.725 1622-1793/system_process D/dalvikvm: GC_FOR_ALLOC freed 1695K, 17% free 10182K/12176K, paused 20ms, total 21ms

Código no onCreate do FormularioActivity: //Manipulando a camera... Button botaoFoto = (Button) findViewById(R.id.formulario_botao_foto); botaoFoto.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { Intent intentCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); String caminhoFoto = getExternalFilesDir(null) + "/" + System.currentTimeMillis() + ".jpg"; File arquivoFoto = new File(caminhoFoto); intentCamera.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(arquivoFoto)); startActivity(intentCamera); } } );

Att,

solução!

Olá novamente Matheus.

Consegui resolver o problema. Fica a dica pra quem precisar:

Por dentro do Android Studio acessei as configurações do meu emulador: Tools - Android - AVD Manager - Edit (lápis) - Show Advanced Settings (Botão).

Na opção Câmera fiz o seguinte: Escolhi o valor "WebCam0" para a opção Front. A opção back deixei "Emulated".

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software