Skip to content
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

[BUG]Cannot rebuild apk caused by "error: must not undeclare prefix" #3722

Open
wanix1988 opened this issue Nov 10, 2024 · 2 comments
Open

Comments

@wanix1988
Copy link

wanix1988 commented Nov 10, 2024

Information

  1. Apktool Version (apktool -version) - 2.10.1
  2. Operating System (Mac, Linux, Windows) - Windows10
  3. APK From? (Playstore, ROM, Other) - Other
  4. Java Version (java --version) - openjdk version "17.0.11" 2024-04-16

Stacktrace/Logcat

W: E:\aweme_douyinweb1_64_v5072_320001_1ceb_1730810468\res\drawable\im_bg_l_fff3f3f4_n_ff202020_corners_25dp.xml:2: error: must not undeclare prefix.
W: E:\aweme_douyinweb1_64_v5072_320001_1ceb_1730810468\res\drawable\im_bg_l_fff3f3f4_n_ff202020_corners_25dp.xml: error: file failed to compile.
W: E:\aweme_douyinweb1_64_v5072_320001_1ceb_1730810468\res\drawable\im_bg_l_ffffffff_n_ff262626_corners_25dp.xml:2: error: must not undeclare prefix.
W: E:\aweme_douyinweb1_64_v5072_320001_1ceb_1730810468\res\drawable\im_bg_l_ffffffff_n_ff262626_corners_25dp.xml: error: file failed to compile.
I: Checking whether sources have changed...
I: Smaling smali_classes21 folder into classes21.dex...
W: E:\aweme_douyinweb1_64_v5072_320001_1ceb_1730810468\res\layout-land\APKTOOL_DUPLICATE_layout_0x7f0d416b.xml:4: error: must not undeclare prefix.
W: E:\aweme_douyinweb1_64_v5072_320001_1ceb_1730810468\res\layout-land\APKTOOL_DUPLICATE_layout_0x7f0d416b.xml: error: file failed to compile.

Exception in thread "main" brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [D:\TEMP\brut_util_Jar_34493143170928039683000070634897683569.tmp, compile, --dir, E:\aweme_douyinweb1_64_v5072_320001_1ceb_1730810468\res, --legacy, -o, E:\aweme_douyinweb1_64_v5072_320001_1ceb_1730810468\build\resources.zip]
        at brut.androlib.AaptInvoker.invokeAapt(SourceFile:0)
        at brut.androlib.ApkBuilder.buildResourcesFull(SourceFile:0)
        at brut.androlib.ApkBuilder.buildResources(SourceFile:0)
        at brut.androlib.ApkBuilder.build(SourceFile:0)
        at brut.apktool.Main.main(SourceFile:0)
Caused by: brut.common.BrutException: could not exec (exit code = 1): [D:\TEMP\brut_util_Jar_34493143170928039683000070634897683569.tmp, compile, --dir, E:\aweme_douyinweb1_64_v5072_320001_1ceb_1730810468\res, --legacy, -o, E:\aweme_douyinweb1_64_v5072_320001_1ceb_1730810468\build\resources.zip]
        at brut.util.OS.exec(SourceFile)
        ... 5 more

Steps to Reproduce

  1. apktool d aweme_douyinweb1_64_v5072_320001_1ceb_1730810468.apk
  2. apktool b aweme_douyinweb1_64_v5072_320001_1ceb_1730810468

Frameworks

If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files
(.apks that live in /system/framework or /system/priv-app)

APK

If this APK can be freely shared, please upload/attach a link to it.
https://lf9-apk.ugapk.cn/package/apk/aweme/1015_320001/aweme_aweGW_v1015_320001_2213_1730831602.apk?v=1730831637

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? Yes
  2. If you are trying to install a modified apk, did you resign it? Yes
  3. Are you using the latest apktool version? Yes
@wanix1988
Copy link
Author

@iBotPeaches is there any advices for this issue? thanks

@iBotPeaches
Copy link
Owner

Not at the moment. I've never seen that error before in my life. I imagine it must have something to do with namespaces, so I'd need to see one of the affected files to confirm my assumption and haven't had time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants