-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apk build fails if use aapt2 option is ON with latest ApkTool (2.4.1) #2386
Comments
Using the new binaries in #2370 seems to fix this problem. |
Thank you for the reply @giacomoferretti Then in the upcoming 2.4.2 release ( https://ibotpeaches.github.io/Apktool/changes/ ). We will get fix for this issue isnt it? |
@vramasam Yes but the macOS binaries are still not ready so unless you are using macOS, you can simply pull that PR and build apktool yourself. |
Thanks @Surendrajat for the suggestion. Can we follow this link for build https://ibotpeaches.github.io/Apktool/build/ ? Is there any specific things we need to take care for aapt2 build ? |
That guide will only help you the APK took jar, and not the aapt2 binary. You should check https://github.com/iBotPeaches/Apktool/blob/master/INTERNAL.md#building-aapt-binaries |
@giacomoferretti @Surendrajat I am seeing the following errors, still: |
I have opened apktool_2.4.1.jar on Winrar, then went to I don't know if what I even did was right, but it still gave me the same error, so anyone could prolly help? |
I'm going to close with merge of #2370 even though I can't replicate this at all. I just even wrote a bunch more aapt2 tests 3ac7e80 and assertions to be 100% sure I wasn't making a mistake and everything passed.... Sorry folks. I can't replicate any of these issues. You are welcome to jump into the code if you want and push forward a fix if you stumble upon anything, but after that merge. I'll consider this resolved. |
FYI, I had the same issue with apktool, and solved it by building apktool from sources. Solved the problem. |
Same error building from source. Version 2.4.2-a2a794-SNAPSHOT The error is the following $ /usr/bin/java -Xmx256m -jar /usr/local/bin/apktool.jar b /base.apk-decompiled --use-aapt2 |
can anyone help? |
W: decompiled/res/values/public.xml:1447: error: resource 'drawable/$avd_hide_password__0' has invalid entry name '$avd_hide_password__0'. Invalid character '$avd_hide_password__0'. I am getting above error . This is the command I am using apktoolPath => 2.5.0 (latest one) Please help us understand is there any problem here. It will be great helpful, if you help in fixing the problem. Please let us know if anyone in this forum able to fix the problem |
There is no documentation yet for using it as a library. If you can find a failing testcase, feel free to push it up for review. My guess is that using a local provided file does not know aapt2 vs aapt1. |
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
apktool d
,apktool b
without changing anything? YESThe text was updated successfully, but these errors were encountered: