Android SDK中摄像头API演示崩溃 [英] Android SDK Camera API Demo Crashes
问题描述
而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屋!