在我的 AndroidManifest.xml 文件中,我有以下两行:
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:required="false" android:name="android.hardware.camera" />
但是当我上传到 Google Play 时,它表明需要相机。如果我使用 aapt 工具,它会显示:“uses-feature: name='android.hardware.camera'”
有谁知道为什么它忽略我的代码并要求设备有摄像头?
编辑:这是我的整个“使用”部分供参考:
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:required="false" android:name="android.hardware.camera" />
<uses-feature android:required="false" android:name="android.hardware.camera.autofocus" />
<uses-feature android:required="false" android:name="android.hardware.camera.front"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:required="false" android:name="android.hardware.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-feature android:required="false" android:name="android.hardware.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-feature android:required="false" android:name="android.hardware.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-feature android:required="false" android:name="android.hardware.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature android:required="false" android:name="android.hardware.INTERNET" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-feature android:required="false" android:name="android.hardware.FLASHLIGHT" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-feature android:required="false" android:name="android.hardware.vibrate" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-feature android:required="false" android:name="android.hardware.CALL_PHONE"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="asn.apps.asncrm.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.SEND" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-feature android:required="false" android:name="android.hardware.telephony"/>