{"id":165,"date":"2019-03-06T14:55:19","date_gmt":"2019-03-06T19:55:19","guid":{"rendered":"https:\/\/blog.markdepalma.com\/?p=165"},"modified":"2019-03-06T14:56:23","modified_gmt":"2019-03-06T19:56:23","slug":"apktool-build-error-brut-common-brutexception-could-not-exec-exit-code-1","status":"publish","type":"post","link":"https:\/\/blog.markdepalma.com\/?p=165","title":{"rendered":"Apktool  &#8211;  build error &#8211; brut.common.BrutException: could not exec (exit code = 1)"},"content":{"rendered":"\n<p>I have an ongoing Android app &#8216;modification&#8217; 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:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">AndroidManifest.xml:1: error: No resource identifier found for attribute 'compileSdkVersion' in package 'android'<br> AndroidManifest.xml:1: error: No resource identifier found for attribute 'compileSdkVersionCodename' in package 'android'<br> W: <br> Exception in thread \"main\" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [<em>\u2026APK&nbsp;path information\u2026<\/em>]<br>     at brut.androlib.Androlib.buildResourcesFull(Androlib.java:492)<br>     at brut.androlib.Androlib.buildResources(Androlib.java:426)<br>     at brut.androlib.Androlib.build(Androlib.java:305)<br>     at brut.androlib.Androlib.build(Androlib.java:270)<br>     at brut.apktool.Main.cmdBuild(Main.java:227)<br>     at brut.apktool.Main.main(Main.java:75)<\/pre>\n\n\n\n<p>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 &#8216;<strong><em>apktool empty-framework-dir<\/em><\/strong>&#8216; I was able to successfully reassemble the APK.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have an ongoing Android app &#8216;modification&#8217; 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 &#8216;compileSdkVersion&#8217; in package &#8216;android&#8217; AndroidManifest.xml:1: error: No resource identifier found for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[74,73],"tags":[75,76,78,77],"class_list":["post-165","post","type-post","status-publish","format-standard","hentry","category-android","category-development","tag-android","tag-apktool","tag-java","tag-smali"],"_links":{"self":[{"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=\/wp\/v2\/posts\/165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=165"}],"version-history":[{"count":4,"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=\/wp\/v2\/posts\/165\/revisions"}],"predecessor-version":[{"id":169,"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=\/wp\/v2\/posts\/165\/revisions\/169"}],"wp:attachment":[{"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}