Delphi 编译的app无法在android 14安装
今天用delphi 12.1升级旧项目,编译正常,但安装时出下面的提示:
08:48:26 E/SplitApkInstaller: Failed to finalize session : INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1849586780.tmp/base.apk (at Binary XML file line #67): com.embarcadero.firemonkey.CCFMXNativeActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present [BT:1.5.0] Error: Installation of the app failed. com.android.tools.build.bundletool.model.exceptions.CommandExecutionException: Installation of the app failed. at com.android.tools.build.bundletool.model.exceptions.InternalExceptionBuilder.build(InternalExceptionBuilder.java:57) at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:145)
解决方法,在AndriodManifest.template.xml文件中增加一句:android:exported="true":
<activity android:name="com.embarcadero.firemonkey.CCFMXNativeActivity" android:label="%activityLabel%" android:configChanges="orientation|keyboard|keyboardHidden|screenSize" android:launchMode="singleTask" android:exported="true"> <!-- Tell NativeActivity the name of our .so --> <meta-data android:name="android.app.lib_name" android:value="%libNameValue%" /> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
正常情况下,你用D12建的项目不存在这个问题,升级旧的项目才可能遇到,因为D12自动加了android:exported="true"。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
2020-04-10 ChinaCock界面控件介绍-TCCStatusBar,TCCTitleBar,TCCNavigatorBar