apktool重新打包错误

时间:2023-11-13 23:20:20

E:\apktool-install-windows-r05-ibot\apktool
-install-windows-r05-ibot\.\test_apk_name\res\layout-large\abs__action_mode_close_ite
m.xml:5: error: No resource identifier found for attribute 'textAllCaps' in pack
age 'android'
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 8, --target-sdk-version, 15, -F, C:\Users\ADMINI~1\AppData\Local\Te
mp\APKTOOL5334589254772572111.tmp, -0, arsc, -I, C:\Users\Administrator\apktool\
framework\1.apk, -S, E:\apktool-install-win
dows-r05-ibot\apktool-install-windows-r05-ibot\.\test_apk_name\res, -M, E:\快盘\pc_de
mo_code\软件\android反汇编\apktool-install-windows-r05-ibot\apktool-install-wind
ows-r05-ibot\.\test_apk_name\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 8, --target-sdk-version, 15, -F, C:\
Users\ADMINI~1\AppData\Local\Temp\APKTOOL5334589254772572111.tmp, -0, arsc, -I,
C:\Users\Administrator\apktool\framework\1.apk, -S, E:\快盘\pc_demo_code\软件\an
droid反汇编\apktool-install-windows-r05-ibot\apktool-install-windows-r05-ibot\.\
test_apk_name\res, -M, E:\apktool-install-window
s-r05-ibot\apktool-install-windows-r05-ibot\.\test_apk_name\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 8, --target-sdk-version, 15, -F, C:\Users\ADMINI~1\AppData\Local\Temp
\APKTOOL5334589254772572111.tmp, -0, arsc, -I, C:\Users\Administrator\apktool\fr
amework\1.apk, -S, E:\apktool-install-windo
ws-r05-ibot\apktool-install-windows-r05-ibot\.\test_apk_name\res, -M, E:\快盘\pc_demo
_code\软件\android反汇编\apktool-install-windows-r05-ibot\apktool-install-window
s-r05-ibot\.\test_apk_name\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more

(1)设置aapt.exe的路径到PATH路径

(2)之前一位是aapt.exe不对,用本机的adt-bundle-windows-x86_64-20131030\sdk\build-tools\android-4.4\aapt.exe替换到下载的aapt.exe

(3)删除这个文件C:\Users\Administrator\apktool\framework\1.apk ,马上打包就好了。

版本信息

jdk 1.7 + apktool1.5(之前一位需要1.6的jdk,实际上1.7的jdk也可以的)