gpt4 book ai didi

java - 尽管 AndroidManifest.xml 中提到了,为什么我的 Android 应用程序无法获得某些权限

转载 作者:行者123 更新时间:2023-12-02 08:13:46 26 4
gpt4 key购买 nike

我正在编写一个 Android 应用程序,通过在 AndroidManifest.xml 中添加以下行,我已向该应用程序授予了以下权限

 <uses-permission android:name="android.permission.INTERNET">
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE">
</uses-permission>
<uses-permission android:name="android.permission.READ_PHONE_STATE">
</uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE">
</uses-permission>
<uses-permission android:name="android.permission.DELETE_CACHE_FILES">
</uses-permission>
<uses-permission android:name="android.permission.DELETE_PACKAGES">
</uses-permission>
<uses-permission android:name="android.permission.BROADCAST_STICKY">
</uses-permission>
<uses-permission android:name="android.permission.GET_PACKAGE_SIZE">
</uses-permission>
<uses-permission android:name="android.permission.INSTALL_PACKAGES">
</uses-permission>
<uses-permission android:name="android.permission.READ_FRAME_BUFFER">
</uses-permission>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW">
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_ALL_DOWNLOADS">
</uses-permission>

但是我在 LogCat 中收到以下错误。我也无法从 SD 卡中删除软件包,我感觉这是由于缺乏执行此操作的权限。

07-28 07:37:32.281: WARN/PackageManager(61): Not granting permission android.permission.DELETE_CACHE_FILES to package com.org.EasyUpload (protectionLevel=3 flags=0xbe46)
07-28 07:37:32.281: WARN/PackageManager(61): Not granting permission android.permission.DELETE_PACKAGES to package com.org.EasyUpload (protectionLevel=3 flags=0xbe46)
07-28 07:37:32.295: WARN/PackageManager(61): Not granting permission android.permission.INSTALL_PACKAGES to package com.org.EasyUpload (protectionLevel=3 flags=0xbe46)
07-28 07:37:32.301: WARN/PackageManager(61): Not granting permission android.permission.READ_FRAME_BUFFER to package com.org.EasyUpload (protectionLevel=2 flags=0xbe46)
07-28 07:37:32.301: WARN/PackageManager(61): Not granting permission android.permission.ACCESS_ALL_DOWNLOADS to package com.org.EasyUpload (protectionLevel=2 flags=0xbe46)

最佳答案

应用程序无法成功请求所有权限:Android 使用 permissionLevel(“正常”、“危险”、“签名”和“signatureOrSystem”),即 described here .

关于java - 尽管 AndroidManifest.xml 中提到了,为什么我的 Android 应用程序无法获得某些权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6855580/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com