Apk build fails if use aapt2 option is ON with latest ApkTool (2.4.1)
See original GitHub issue- Apktool Version 2.4.1
- Operating System MAC
- APK From? (My Project)
Stacktrace/Logcat
W: res/values/public.xml:1012: error: resource ‘drawable/$avd_hide_password__0’ has invalid entry name ‘$avd_hide_password__0’. Invalid character ‘$avd_hide_password__0’. W: res/values/public.xml:1013: error: resource ‘drawable/$avd_hide_password__1’ has invalid entry name ‘$avd_hide_password__1’. Invalid character ‘$avd_hide_password__1’. W: res/values/public.xml:1014: error: resource ‘drawable/$avd_hide_password__2’ has invalid entry name ‘$avd_hide_password__2’. Invalid character ‘$avd_hide_password__2’. W: res/values/public.xml:1015: error: resource ‘drawable/$avd_show_password__0’ has invalid entry name ‘$avd_show_password__0’. Invalid character ‘$avd_show_password__0’. W: res/values/public.xml:1016: error: resource ‘drawable/$avd_show_password__1’ has invalid entry name ‘$avd_show_password__1’. Invalid character ‘$avd_show_password__1’. W: res/values/public.xml:1017: error: resource ‘drawable/$avd_show_password__2’ has invalid entry name ‘$avd_show_password__2’. Invalid character ‘$avd_show_password__2’. W: res/values/public.xml: error: file failed to compile. brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1):
Steps to Reproduce Build apk using latest apktool version (2.4.1)
I saw this issue got fixed in 2.3.4 version in #1776 , But above issue is still happening. #2119 #2356 not able to get much information.
Can you please guide here
Questions to ask before submission
- Have you tried
apktool d
,apktool b
without changing anything? YES - If you are trying to install a modified apk, did you resign it? YES
- Are you using the latest apktool version? YES
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (4 by maintainers)
Top GitHub Comments
Using the new binaries in #2370 seems to fix this problem. Tested with Apktool 2.4.2 built from source on Linux.
I have opened apktool_2.4.1.jar on Winrar, then went to
prebuilt/windows
, then I have replacedaapt2.exe
with https://github.com/iBotPeaches/Apktool/blob/e6b18d24f5835aca09ecd40e88ef06450a95b99d/brut.apktool/apktool-lib/src/main/resources/prebuilt/windows/aapt2.exe and replaceaapt2_x64.exe
with https://github.com/iBotPeaches/Apktool/blob/e6b18d24f5835aca09ecd40e88ef06450a95b99d/brut.apktool/apktool-lib/src/main/resources/prebuilt/windows/aapt_64.exe (both link to the files I got from https://github.com/iBotPeaches/Apktool/pull/2370/files).I don’t know if what I even did was right, but it still gave me the same error, so anyone could prolly help?