Android SDK中摄像头API演示崩溃 [英] Android SDK Camera API Demo Crashes

查看:342
本文介绍了Android SDK中摄像头API演示崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

而Android SDK的API演示使用相机的preVIEW。但是,这给了我一个运行时异常的模拟器。我与Eclipse在Mac上运行10.6

The Android SDK has an API demo for using the preview of the camera. However, this gives me a runtime exception in the emulator. I'm running with Eclipse on a Mac with 10.6

下面就是我抓住了code中的链接:

Here's the link where I grabbed the code:

<一个href="http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/Camera$p$pview.html" rel="nofollow">http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/Camera$p$pview.html

推荐答案

请确保你在AndroidManifest.xml文件设置权限使用相机。将应用程序标记上面这条线。

Make sure you have set permissions in the AndroidManifest.xml file for using the camera. Place this line above the application tag.

<uses-permission android:name="android.permission.CAMERA" />

这篇关于Android SDK中摄像头API演示崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆