Android 相机服务连接失败,连接照相机服务失败 Fail to connect to camera service

连接照相机服务失败

Fail to connect to camera service

重启手机,就行了。

Restart your cell phone, and that's

it.​

这是因为照相机服务还在,没有被正常释放。​检查并修缮代码。

​This is because the camera

service is still there, and is not normally

released.Check and repair code.

===========详细错误日志:

​detail error

log:

08-04

01:45:03.373: E/libEGL(1380): cache file failed CRC

check

缓存文件失败的CRC校验​

08-04 01:45:06.217: E/AndroidRuntime(1380): FATAL

EXCEPTION: main

08-04 01:45:06.217: E/AndroidRuntime(1380): Process:

com.example.frontandrearcameras, PID: 1380

08-04 01:45:06.217: E/AndroidRuntime(1380):

java.lang.IllegalStateException: Could not execute method of the

activity

08-04 01:45:06.217: E/AndroidRuntime(1380): at

android.view.View$1.onClick(View.

08-04 01:45:06.217: E/AndroidRuntime(1380): at

android.view.View.performClick(View.

08-04 01:45:06.217: E/AndroidRuntime(1380): at

android.view.View$PerformClick.run(View.

08-04 01:45:06.217: E/AndroidRuntime(1380): at

android.os.Handler.handleCallback(Handler.

08-04 01:45:06.217: E/AndroidRuntime(1380): at

android.os.Handler.dispatchMessage(Handler.

08-04 01:45:06.217: E/AndroidRuntime(1380): at

android.os.Looper.loop(Looper.

08-04 01:45:06.217: E/AndroidRuntime(1380): at

android.app.ActivityThread.main(ActivityThread.

08-04 01:45:06.217: E/AndroidRuntime(1380): at

08-04 01:45:06.217: E/AndroidRuntime(1380): at

08-04 01:45:06.217: E/AndroidRuntime(1380): at

com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.

08-04 01:45:06.217: E/AndroidRuntime(1380): at

com.android.internal.os.ZygoteInit.main(ZygoteInit.

08-04 01:45:06.217: E/AndroidRuntime(1380): Caused by:

java.lang.reflect.InvocationTargetException

08-04 01:45:06.217: E/AndroidRuntime(1380): at

08-04 01:45:06.217: E/AndroidRuntime(1380): at

08-04 01:45:06.217: E/AndroidRuntime(1380): at

android.view.View$1.onClick(View.

08-04 01:45:06.217: E/AndroidRuntime(1380): ... 10

more

08-04 01:45:06.217: E/AndroidRuntime(1380): Caused by:

java.lang.RuntimeException: Fail to connect to camera

service

08-04 01:45:06.217: E/AndroidRuntime(1380): at

android.hardware.Camera.(Camera.

08-04 01:45:06.217: E/AndroidRuntime(1380): at

android.hardware.Camera.open(Camera.

08-04 01:45:06.217: E/AndroidRuntime(1380): at

com.example.frontandrearcameras.MainActivity.openRearCamera(MainActivity.

08-04 01:45:06.217: E/AndroidRuntime(1380): ... 13

more

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值