在AndroidManifest.xml文件中具有重复权限是否可以?
我正在尝试将react-native-webrtc添加到我的react-native项目中,这需要我添加一些权限。最初的AndroidManifest.xml文件已经具有权限列表,如果我添加react-native-webrtc所需的权限,则其中一些权限将重复。既然在这个问题上,ios是否也适用?
需要通过REACT-NATIVE-WEBRTC添加
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
原始
<!-- These are required permissions to make the app run -->
<uses-permission android:name="com.bulbtech.hendrysocket.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- ADD PERMISSIONS HERE -->
<!-- BEGIN OPTIONAL PERMISSIONS -->
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
<uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
答案 0 :(得分:1)
否,您不能在AndroidManifest.xml文件中复制权限,如果复制该权限,则代码将崩溃,并且某些代码可用于ios