找不到用于处理Intent的活动{act = android.media.action.IMAGE_CAPTURE} [英] No Activity found to handle Intent { act=android.media.action.IMAGE_CAPTURE }
问题描述
当我尝试调用ACTION_IMAGE_CAPTURE意图时,我在Android应用程序中收到以下崩溃报告.这段代码已经在我的应用程序中运行了几个月,没有任何问题.我猜想这是特定于某种类型的手机的东西,但是不幸的是Google并没有在堆栈跟踪之外为我提供任何其他信息.有什么想法可能导致该崩溃报告吗?
I received the following crash report in my Android application when trying to call the ACTION_IMAGE_CAPTURE intent. This code has been running in my app for months with no issues. I am guessing this is something specific to a certain type of phone but unfortunately Google does not provide me with any additional information outside the stack trace. Any ideas what could have caused this crash report?
堆栈跟踪
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.media.action.IMAGE_CAPTURE }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1409)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379)
at android.app.Activity.startActivityFromChild(Activity.java:3067)
at android.app.Activity.startActivityForResult(Activity.java:2847)
生产代码
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, MY_CAMERA_ACTIVITY_REQUEST_CODE);
清单条目
<uses-sdk android:minSdkVersion="7" />
<uses-feature android:name="android.hardware.camera" />
推荐答案
我想到了一些事情 1.可能是平板电脑,点燃的火没有相机. 2.没有摄像头的手机 3.未安装SD卡
A few things come to mind 1.Could be a tablet, the kindle fire does not have a camera. 2. A phone that does not have a camera 3. No SD card installed
我同意您会认为调用图像捕获意图是一种安全的操作,但是由于有许多运行Android的设备,因此无法知道您的应用程序在哪台设备上运行.
I agree you would think it would be a safe operation to call the image capture intent but with so many devices running Android it's impossible to know what device your app is running on.
这篇关于找不到用于处理Intent的活动{act = android.media.action.IMAGE_CAPTURE}的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!