aapt dump badging fails “dump failed because assets could not be loaded”

偶尔善良 提交于 2019-12-23 21:01:19

问题


When I run the aapt dump badging on my apk I get the below error

W/asset   (17217): Asset path Users/username/Downloads/appname.apk is neither a directory nor file (type=1).
ERROR: dump failed because assets could not be loaded

I couldn't find why it happens.
I'm using iMac.


回答1:


I have faced this problem in my case it was missing of the (.)dot in following terminal command

./aapt dump badging /Users/username/Documents/Android/Release/PROD/appname.apk 

Hope this helps




回答2:


I come this issue with

sudo -u www /usr/share/aapt/aapt d badging /home/roofe/200.apk
getFileType got errno=13 on '/home/roofe/200.apk'
getFileType got errno=13 on '/home/roofe/200.apk'
W/asset   ( 1315): Asset path /home/roofe/200.apk is neither a directory nor file (type=0).
ERROR: dump failed because assets could not be loaded

But when I use sudo /usr/share/aapt/aapt d badging /home/roofe/200.apk, it works well. So I realise it's caused by permission.

Then I move the file to /data/www where the full path have the mode www:www, and it works.



来源:https://stackoverflow.com/questions/26653704/aapt-dump-badging-fails-dump-failed-because-assets-could-not-be-loaded

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