Google Play Android .apk Upload “Failed to run aapt dump badging”

淺唱寂寞╮ 提交于 2019-12-23 08:58:37

问题


It has been almost a year since I last uploaded an App to the Google Play Developer Console (it is a Cordova App that I have signed and zip aligned); follow the same process I have used successfully in the past I am now getting the following error:

Upload failed Your APK cannot be analyzed using 'aapt dump badging'. Error output: Failed to run aapt dump badging: ERROR: dump failed because assets could not be loaded

What's happening here?


回答1:


This was a total noob mistake :

Part of the process of preparing the .apk file is to unzip the .apk created by the Cordova build process, then remove the META-INF folder, then rezip and rename back to an .apk. The mistake I made was that, when rezipping, I was zipping the FOLDER, rather than zipping the CONTENTS of the folder.
Another way to say that is that I created the Archive one directory too high in the path.

I'm leaving the question and posting the answer in the hope it will help someone else.




回答2:


I found the root cause is that we use the 7Zip application to pack the zip package, the right solution is use the ZipAlign tool under sdk/tools/ to pack it.



来源:https://stackoverflow.com/questions/25477592/google-play-android-apk-upload-failed-to-run-aapt-dump-badging

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!