赞
踩
包体:unity 2019构建的Android .aab, 安装后闪退
准备工具:
https://github.com/google/bundletool 用这个工具转换成apks在安装。
GooglePlay文档
bundletool | Android Studio | Android Developers
2转换步骤:
cmd 用管理员模式运行,否则会报错找不到'C:\Users\用户名\.android\debug.keystore'.
java -jar "工具.jar" build-apks --bundle="需要转换的.aab" --output="导出路径\myapp.apks"
例子:java -jar "F:\AndroidTool\bundletool-all-1.15.6.jar" build-apks --bundle="路径\.aab" --output="导出路径\myapp.apks"
注意:转换的时候会被重新签名,所以不是原来的包了
INFO: The APKs will be signed with the debug keystore found at 'C:\Users\用户名\.android\debug.keystore'.
3安装操作:
java -jar "工具.jar" install-apks --apks="安装集合包.apks"
例子: java -jar "F:\AndroidTool\bundletool-all-1.15.6.jar" install-apks --apks="路径\myapp.apks"
4闪退原因及解决:
报错是
No pending exception expected: java.lang.SecurityException: com.xxx.xxx: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
我这里解决了这个题的方式是:
mainTemplate.gradle中添加
implementation "com.google.android.play:core:1.10.0"
打包后正常运行了,只试了一个包。8月份前会更新其他项目,具体在验证下。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。