"distribute" : {
/ 应用发布信息 /
"android" : {
"permissionExternalStorage" : {
"request" : "none",
"prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
},
"permissionPhoneState" : {
"request" : "none",
"prompt" : "为保证您正常、安全地使用,需要获取设备识别码(部分手机提示为获取手机号码)使用权限,请允许。"
},
/ android打包配置 /
"permissions" : [
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.BROADCAST_PACKAGE_REMOVED\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CALENDAR\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.RESTART_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CALENDAR\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.BROADCAST_PACKAGE_ADDED\"/>",
"<uses-permission android:name=\"android.permission.BROADCAST_PACKAGE_CHANGED\"/>",
"<uses-permission android:name=\"android.permission.BROADCAST_PACKAGE_INSTALL\"/>",
"<uses-permission android:name=\"android.permission.BROADCAST_PACKAGE_REPLACED\"/>"
],
"schemes" : "cuimian",
"abiFilters" : [ "arm64-v8a" ],
"hardwareAccelerated" : true,
"autoSdkPermissions" : false,
"minSdkVersion" : 21,
"targetSdkVersion" : 30,
"excludePermissions" : [
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\\"/>"
]
},
- 发布:2024-12-02 16:22
- 更新:2024-12-03 11:36
- 阅读:39
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: Windows 10
HBuilderX类型: 正式
HBuilderX版本号: 4.36
手机系统: Android
手机系统版本号: Android 11
手机厂商: 小米
手机机型: Redmi K40
页面类型: vue
vue版本: vue2
打包方式: 云端
项目创建方式: HBuilderX
App下载地址或H5⽹址: https://cuimian-1300582464.file.myqcloud.com/apk/33009.apk
操作步骤:
预期结果:
关闭权限后,app不弹出权限提示
关闭权限后,app不弹出权限提示
实际结果:
关闭权限后,app弹出权限提示
关闭权限后,app弹出权限提示
bug描述:
"minSdkVersion" : 21,
"targetSdkVersion" : 30,
"excludePermissions" : [
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\\"/>"
]
excludePermissions属性项内容格式不正确,不需要使用两个连续"\"字符,正确方式是使用一个"\"字符就可以。
另外还应该移除android.permission.ACCESS_BACKGROUND_LOCATION权限。
正确配置方式如下:
"excludePermissions" : [
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_BACKGROUND_LOCATION\"/>"
]
w1001616 (作者)
谢谢
2024-12-03 14:44