首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >bundletool(INSTALL_PARSE_FAILED_NO_CERTIFICATES)无法安装安卓应用包APP

bundletool(INSTALL_PARSE_FAILED_NO_CERTIFICATES)无法安装安卓应用包APP
EN

Stack Overflow用户
提问于 2020-02-03 13:32:58
回答 1查看 854关注 0票数 0

我通过Android应用程序包购买了我的应用程序,然后通过

代码语言:javascript
复制
bundletools:<br>
.\bundletool-all-0.11.0.jar build-apks --bundle=gallery-v1.2.1_8-googleplay-release.aab --output=gallery-gp.apks<br>
But when I want to install the apks into devices by this commond:<br>
java -jar .\bundletool-all-0.11.0.jar install-apks --apks=gallery-gp.apks I get those errors:<br>

WARNING: An illegal reflective access operation has occurred<br>
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/E:/temp/apk/bundletool-all-0.11.0.jar) to field java.nio.Buffer.address     <br>
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil<br>
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations<br>
WARNING: All illegal access operations will be denied in a future release<br>
The APKs have been extracted in the directory: C:\Users\CHRISZ~1\AppData\Local\Temp\10477684387867783528
01:12:24 E/SplitApkInstaller: Failed to finalize session : INSTALL_PARSE_FAILED_NO_CERTIFICATES: Package /data/app/vmdl1694662475.tmp/0_base-xxhdpi has no certificates at entry AndroidManifest.xml<br>
[BT:0.11.0] Error: Installation of the app failed.<br>
com.android.tools.build.bundletool.model.exceptions.InstallationException: Installation of the app failed.<br>
        at com.android.tools.build.bundletool.model.exceptions.InstallationException$Builder.build(InstallationException.java:47)
        at com.android.tools.build.bundletool.model.exceptions.InstallationException$Builder.build(InstallationException.java:41)
        at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:133)
        at com.android.tools.build.bundletool.device.ApksInstaller.installOnDevice(ApksInstaller.java:94)
        at com.android.tools.build.bundletool.device.ApksInstaller.installApks(ApksInstaller.java:82)
        at com.android.tools.build.bundletool.device.ApksInstaller.installApks(ApksInstaller.java:44)
        at com.android.tools.build.bundletool.commands.InstallApksCommand.execute(InstallApksCommand.java:165)
        at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:88)
        at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:46)
Caused by: com.android.ddmlib.InstallException: Failed to finalize session : INSTALL_PARSE_FAILED_NO_CERTIFICATES: Package /data/app/vmdl1694662475.tmp/0_base-xxhdpi has no certificates at entry AndroidManifest.xml
        at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:91)
        at com.android.ddmlib.Device.installPackages(Device.java:928)
        at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:117)
        ... 6 more<br>

我想我真的签署了我的应用程序,因为我使用。/gradlew assembleRelease可以得到一个正常的apk,它可以安装到设备成功,但我使用./gradlew bundleRelease得到一个aab,它不能安装到设备的错误INSTALL_PARSE_FAILED_NO_CERTIFICATES。

任何建议都将不胜感激。

EN

回答 1

Stack Overflow用户

发布于 2020-02-04 11:18:51

问题已经解决了。在进一步查看文档后,我了解到在使用bundletool生成APK集归档时,需要指定签名文件。我之前没有指定,但是生成的apks仍然可以安装,因为bundletool会默认使用debug签名,而当我生成这个文件时,由于某种原因,我的机器上的debug签名丢失了,所以生成的文件因为缺少签名而无法安装。在我的机器上重新生成调试签名文件后,可以安装再次生成的apks。谢谢你的帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60033586

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档