error: Public symbol drawable declared here is not defined.多数情况下我们修改完后使用“apktool b xxx”命令并不能保证可以顺利地回编译。
常见的错误是.../res/values/public.xml:数字 error: Public symbol.../xxxx declared here is not defined
这跳debug信息告诉我们/res/values/public.xml文件中第“数字”行出错,里面指定的对象在res目录下不存在。
这是精简或图片资源引用错误引起的,比如某张图片在其他dpi里定义了,在当前保留的dpi里却用不到,当我们把它删除
后,并没有删除它在public.xml文件中的定义,程序回编译的时候按照public.xml去找它却已经找不到了,于是就报错了。
解决的方法就是打开public.xml文件,删除相应的行
error: Error retrieving parent foritem: No resource found that matches thegivenname '@android:style/WindowTitle'.
error: Error retrieving parent foritem: No resource found that matches thegivenname '@android:style/WindowTitleBackgroun
加*号
<style name="Base.TextAppearance.AppCompat.Widget.Button.Inverse" parent="@*android:style/WindowTitle" />
<style name="Base.Widget.AppCompat.Button.Colored" parent="@*android:style/WindowTitleBackground" />
apktool b -f xxx_dir -o xxx_repack.apkapksigner sign --ks xxx.keystore --out xxx_repack_signed.apk test-repack.apk 异常处理error: Public symbol drawable declared here is not defined.多数情况下我们修改完后使用“apktool b