【发布时间】:2015-04-29 01:00:53
【问题描述】:
我想检查相机参数,我还有旧手机,我正在使用库 android.hardware.camera。我这里有一个错误,我在其他网站上没有找到任何解决方案:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.arkadio.cameralight/com.example.arkadio.cameralight
Binary XML file line #16: Error inflating class uses-permission"
我的 XML 在这里
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity">
<TextView
android:text="@string/hello_world"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
</RelativeLayout>
和我的代码:
谢谢!
【问题讨论】: