Apktool – build error – brut.common.BrutException: could not exec (exit code = 1)

I have an ongoing Android app ‘modification’ project that I periodically need to perform updates on. I recently went to disassemble, re-modify, and reassemble the new version of the APK and was presented with this error:

AndroidManifest.xml:1: error: No resource identifier found for attribute 'compileSdkVersion' in package 'android'
AndroidManifest.xml:1: error: No resource identifier found for attribute 'compileSdkVersionCodename' in package 'android'
W:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): […APK path information…]
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)

I updated apktool/JDK and made sure everything else with my setup was correct. After a little digging I found that I just needed to run a cleanup to resolve the issue. After running ‘apktool empty-framework-dir‘ I was able to successfully reassemble the APK.

2 thoughts on “Apktool – build error – brut.common.BrutException: could not exec (exit code = 1)

  1. Martinvirtus

    Hi! Please help for me. Where do you runned the command or what you cleaned? And you are using Linux or Windows? I need help for Windows. Please help ME.

    1. Mark DePalma Post author

      This was run in command prompt (shell) and this was under Windows, but the command would be similar in Linux. Apktool is pretty much the same in both operating systems.

Leave a Reply