Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

I can't export my Unity project as an apk! "Failed to re-package resources" [SOLVED]

Discussion in 'Android' started by Einfach_Tobi, Jun 20, 2016.

  1. Einfach_Tobi

    Einfach_Tobi

    Joined:
    May 29, 2016
    Posts:
    13
    Hi!
    After I looked up my error on google, I found many sides with tutorials on how to fix that. But none of these seem to work.

    So, whenever I try to export my project as an apk I get the following error message. The unity project itself is working fine and can be played in the editor. Just the export is not working

    Thanks for helping!

    The Error:


    Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
    D:\Users\MyName\AppData\Local\Android\android-sdk\build-tools\24.0.0\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "D:/Users/MyName/AppData/Local/Android/android-sdk\platforms\android-24\android.jar" -F bin/resources.ap_

    stderr[

    ]
    stdout[

    ]
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    This issue was raised a few times already this week. I believe that Unity is not able to work with android tools version 24.0.0 *YET*.

    You should either upgrade to the latest available Unity version (which may resolve this issue), or drop build-tools/24.0.0 for now.
     
    Einfach_Tobi likes this.
  3. Einfach_Tobi

    Einfach_Tobi

    Joined:
    May 29, 2016
    Posts:
    13
    Thank you! I'm using the newest version of Unity already, so i'll downgrade build-tools.
     
  4. that-steve-guy

    that-steve-guy

    Joined:
    Apr 21, 2013
    Posts:
    15
    I upgraded via the patch (but only the android patch) to 5.3.5p4f and no luck (despite a stack of Android fixes listed)
    Also tried 5.4 beta to no avail...

    The tools version is now at 25.1.7 in the SDK but the platform tools and build tools are at 24

    "i'll downgrade build-tools." might work, my install on my laptop June 5th - was fine.
    But I uninstalled 25.1.7 - 24 in the SDK Tools, and still nadda.

    On the plus side "issue was raised a few times already this week"
    ... nice to know its not just me.

    On the downside, I start teaching a class on Google Cardboard next week.
    ... so this might be a pretty rough
     
  5. that-steve-guy

    that-steve-guy

    Joined:
    Apr 21, 2013
    Posts:
    15
  6. Einfach_Tobi

    Einfach_Tobi

    Joined:
    May 29, 2016
    Posts:
    13
    Yeah the fix is, to uninstall 24 in the SDK Tools and use 23.
    Worked totally fine for me.


    I was creating something for the Cardboard too! I was not happy about this error.
     
  7. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
  8. bob539

    bob539

    Joined:
    Feb 19, 2019
    Posts:
    6