2***@qq.com
2***@qq.com
  • 发布:2021-05-14 10:46
  • 更新:2023-05-04 15:40
  • 阅读:2382

permissionExternalStorage 不起作用 提示语根本不显示

分类:uni-app

"distribute" : {
/ android打包配置 /
"android" : {
"permissionPhoneState" : {
"request" : "none",
"prompt" : "需要获取设备信息,统计app使用率"
},
// 应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许 wgt
"permissionExternalStorage" : {
"request" : "once",
"prompt" : "应用需要保存运行状态,用户信息等数据到手机。"
},
"permissions" : [
"<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.ACCESS_WIFI_STATE\"/>",
"<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.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
// 为保证您正常、安全地使用,需要获取设备识别码(部分手机提示为获取手机号码)使用权限,请允许
"abiFilters" : [ "armeabi-v7a" ],
"minSdkVersion" : "",
"targetSdkVersion" : ""
},
/ ios打包配置 /
"ios" : {},
/ SDK配置 /
"sdkConfigs" : {
"maps" : {
"amap" : {
"appkey_ios" : "16e3ef150e908a8764a275ca314ce6b5",
"appkey_android" : "16e3ef150e908a8764a275ca314ce6b5"
}
},
"geolocation" : {
"amap" : {
"platform" : [ "ios", "android" ],
"appkey_ios" : "16e3ef150e908a8764a275ca314ce6b5",
"appkey_android" : "16e3ef150e908a8764a275ca314ce6b5"
}
},
"ad" : {}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen" : {
"androidStyle" : "default",
"android" : {
"hdpi" : "C:/Users/Administrator/Desktop/LOGO/480_762.png",
"xhdpi" : "C:/Users/Administrator/Desktop/LOGO/720_1242.png",
"xxhdpi" : "C:/Users/Administrator/Desktop/LOGO/1080_1882.png"
}
}
}

2021-05-14 10:46 负责人:无 分享
已邀请:
2***@qq.com

2***@qq.com

也是不起作用,仍然会弹出授权弹窗。

  • 景风

    你好,你解决了吗?

    2021-07-26 22:27

  • x***@163.com

    回复 景风: 你好,你解决了吗

    2022-05-24 10:54

aiyide

aiyide

根目录下面新建一个文件 名字为 androidManifest.xml
内容如下

<application>    
    <meta-data android:name="DCLOUD_WRITE_EXTERNAL_STORAGE" android:value="none"/>    
    <meta-data android:name="DCLOUD_READ_PHONE_STATE" android:value="none"/>    
</application>  
j***@163.com

j***@163.com

你好 解决了吗?小米的这样

1***@qq.com

1***@qq.com

你把这个自定义权限配置一下试试
custompermissions:true

要回复问题请先登录注册