今天再升级使用apktoo2.3.1
在执行 apktool b xxx.apk时;
报错I: Using Apktool 2.3.1
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
W: D:\mr.gao\mr.gao\apktool\app-release\res\layout-v26\abc_screen_toolbar.xml:5:
error: No resource identifier found for attribute 'keyboardNavigationCluster' i
n package 'android'
W:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec (exit code = 1): [C:\User
s\ADMINI~1\AppData\Local\Temp\brut_util_Jar_352953062142525827.tmp, p, --forced-
package-id, 127, --min-sdk-version, 14, --target-sdk-version, 26, --version-code
, 1, --version-name, 1.0, --no-version-vectors, -F, C:\Users\ADMINI~1\AppData\Lo
cal\Temp\APKTOOL6679267152216767625.tmp, -0, arsc, -0, arsc, -I, C:\Users\Admini
strator\AppData\Local\apktool\framework\1.apk, -S, D:\mr.gao\mr.gao\apktool\app-
release\res, -M, D:\mr.gao\mr.gao\apktool\app-release\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:492)
at brut.androlib.Androlib.buildResources(Androlib.java:426)
at brut.androlib.Androlib.build(Androlib.java:305)
at brut.androlib.Androlib.build(Androlib.java:270)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:75)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec (exit code = 1): [C:\Users\ADMINI~1\AppData\Local\Temp\brut_util_Jar_35295
3062142525827.tmp, p, --forced-package-id, 127, --min-sdk-version, 14, --target-
sdk-version, 26, --version-code, 1, --version-name, 1.0, --no-version-vectors, -
F, C:\Users\ADMINI~1\AppData\Local\Temp\APKTOOL6679267152216767625.tmp, -0, arsc
, -0, arsc, -I, C:\Users\Administrator\AppData\Local\apktool\framework\1.apk, -S
, D:\mr.gao\mr.gao\apktool\app-release\res, -M, D:\mr.gao\mr.gao\apktool\app-rel
ease\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:456)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:478)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\
ADMINI~1\AppData\Local\Temp\brut_util_Jar_352953062142525827.tmp, p, --forced-pa
ckage-id, 127, --min-sdk-version, 14, --target-sdk-version, 26, --version-code,
1, --version-name, 1.0, --no-version-vectors, -F, C:\Users\ADMINI~1\AppData\Loca
l\Temp\APKTOOL6679267152216767625.tmp, -0, arsc, -0, arsc, -I, C:\Users\Administ
rator\AppData\Local\apktool\framework\1.apk, -S, D:\mr.gao\mr.gao\apktool\app-re
lease\res, -M, D:\mr.gao\mr.gao\apktool\app-release\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:450)
... 6 more
是因为在老的apktool 在本地生成的框架没有更新;
解决办法,
1.删除 C:\Users\Administrator\AppData\Local\apktool\framework\1.apk
2.执行apktool empty-framework-dir --force 更新到2.3.1的框架就就ok了