android 15升级适配无法安装运行,并且提示应用未安装

最近升级项目到android15,一开始遇到这个报错,以为是广播的问题,因为当时在Log中发现这个的报错

  • One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be

这条报错的解决方案依据 google开发者android14 关于这条的 原文:

  • Apps and services that target Android 14 and use context-registered receivers are required to specify a flag to indicate whether or not the receiver should be exported to all other apps on the device: either RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED, respectively. This requirement helps protect apps from security vulnerabilities by leveraging the features for these receivers introduced in Android 13.

但是之前升级不在主分支上,那个分支解决后切换主分支后安装run 日志模块中又报这个日志

-Exception occurred while executing 'start':

java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.asus.rogforum/com.zhiyicx.thinksnsplus.modules.guide.GuideActivity } from null (pid=15320, uid=2000) not exported from uid 10219

at com.android.server.wm.ActivityTaskSupervisor.checkStartAnyActivityPermission(ActivityTaskSupervisor.java:1270)

at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1266)

at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:901)

at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1401)

at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1346)

at com.android.server.am.ActivityManagerService.startActivityAsUserWithFeature(ActivityManagerService.java:3532)

at com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:800)

at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:246)

at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)

at android.os.ShellCommand.exec(ShellCommand.java:38)

at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:10971)

at android.os.Binder.shellCommand(Binder.java:1230)

at android.os.Binder.onTransact(Binder.java:1043)

at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:5785)

at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2962)

at android.os.Binder.execTransactInternal(Binder.java:1505)

at android.os.Binder.execTransact(Binder.java:1444)

然后我找到主界面偶然看到exported 为false,改为true后尝试运行了一下,纳尼,竟然成功安装了,以后还是得仔细看日志啊,里面关键信息 not exported from 是 要敲脑袋得

相关推荐
luckys.one1 小时前
第9篇:Freqtrade量化交易之config.json 基础入门与初始化
javascript·数据库·python·mysql·算法·json·区块链
TomCode先生1 小时前
c#动态树形表达式详解
开发语言·c#
高-老师2 小时前
基于R语言的物种气候生态位动态量化与分布特征模拟
开发语言·r语言·物种气候
大翻哥哥2 小时前
Python 2025:量化金融与智能交易的新纪元
开发语言·python·金融
weixin_437830943 小时前
使用冰狐智能辅助实现图形列表自动点击:OCR与HID技术详解
开发语言·javascript·ocr
鹿鹿学长3 小时前
2025年全国大学生数学建模竞赛(C题) 建模解析|婴儿染色体数学建模|小鹿学长带队指引全代码文章与思路
c语言·开发语言·数学建模
zhousenshan3 小时前
Python爬虫常用框架
开发语言·爬虫·python
IMER SIMPLE4 小时前
人工智能-python-深度学习-经典神经网络AlexNet
人工智能·python·深度学习
CodeCraft Studio4 小时前
国产化Word处理组件Spire.DOC教程:使用 Python 将 Markdown 转换为 HTML 的详细教程
python·html·word·markdown·国产化·spire.doc·文档格式转换
DKPT4 小时前
Java内存区域与内存溢出
java·开发语言·jvm·笔记·学习