前言
当我们利用apktool.jar回编译的时候可能会出现各种各样的错误,大部分都是资源文件上带来的错误,首先我们可以通过更新一下apktool.jar,这里是连接http://ibotpeaches.github.io/Apktool/。下面是我所遇到的相关问题及解决的方法:
1.对PNG文件解析失败
I: Using Apktool 2.0.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
libpng error: Not a PNG file
ERROR: Failure processing PNG image E:\逆向工具包\Android逆向\反编译\apktool2.2\.\xxxx\res\drawable-hdpi\
lbs_phone.png
libpng error: Not a PNG file
ERROR: Failure processing PNG image E:\逆向工具包\Android逆向\反编译\apktool2.2\.\xxxx\res\drawable-hdpi\
lbs_route.png
libpng error: Not a PNG file
ERROR: Failure processing PNG image E:\逆向工具包\Android逆向\反编译\apktool2.2\.\xxx\res\drawable-ldpi\
z_jq_hf5.png
这里只需要利用图片编辑工具或者windows自带的paint将图片另存为PNG图片就可以了.
I: Using Apktool 2.0.0
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs...
I: Building apk file...
I: Copying unknown files/dir...
回编译成功