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

android package tool failed when building all the levels.

Discussion in 'Android' started by Darath_Infinigon, Apr 9, 2016.

  1. Darath_Infinigon

    Darath_Infinigon

    Joined:
    Jan 22, 2015
    Posts:
    4
    Hi,

    I expend the last days trying to build our project. And when we do the full build ( with all the levels ) I always have this android package tool failed error.

    The point is when we build only the first half of the project, it works, when we build the second part, it works ( We did it to be sure some level is not adding some asset that can crash the build ). But when we try to create the build with the whole game, always fails.

    Our project is quite big, but the apk should'nt be bigger than 4gb, anyway, we tried to build with obb files, and without obb files, Always with the same result.

    I also checked my ram during the packaging process and never is used more than 70% of the total, so, is not a ram problem.

    We tried to compress the textures in default, in ETC, in TEGRA without difference and we are sure is not about any pluguin conflict.

    So... we are quite desesperate, we should publish our game but there is no way to build it.

    Some one had the same error ? how we can fix it or work arroung it ?

    Thanks in advance!

    Here more info about the error:

    Unity: 5.3.4
    AndroidSDK 6.0
    Android SDK Build tools. 23.0.3

    Error building Player: CommandInvokationFailure: Android Asset Packaging Tool failed. See the Console for details.
    C:\Users\Elfoskuro\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe package -v -f -F assets.ap_ -A assets

    stderr[
    Unable to add 'assets\bin\Data\sharedassets57.assets.split83': Zip add failed (-2147483648)
    ERROR: unable to process assets while packaging 'assets.ap_'
    ERROR: packaging of 'assets.ap_' failed
    ]
    stdout[
    Found 6240 custom asset files in assets
    Configurations:
    (default)
     
  2. bitter

    bitter

    Unity Technologies

    Joined:
    Jan 11, 2012
    Posts:
    530
    I think this is Androids way of telling you you are building a file that is larger than 2Gb on Windows. And the current Android SDK can't handle that.
     
  3. Darath_Infinigon

    Darath_Infinigon

    Joined:
    Jan 22, 2015
    Posts:
    4
    Hi, Thanks for your answer.

    But the error persist when splitting the apk with expansion files, does that means we can not do a build bigger than 2gb even with the "Split application" checker set to true ?

    How we can proceed to build a 3.5gb aplication for android ?

    Thanks!
     
  4. bitter

    bitter

    Unity Technologies

    Joined:
    Jan 11, 2012
    Posts:
    530
    According to "Rules and Limitations" any OBB can't be larger than 2Gb.
    http://developer.android.com/google/play/expansion-files.html#Rules

    Depending on your data you may want to try using AssetBundles. Which may be preferable anyways so you can download data on demand rather than downloading all data in advance.

    What is it that you have in your build that is pushing you over the 2Gb limit? 2Gb is an awful lot of data for an Android game ;-) If you are streaming video (from Streaming Assets folder) those videos could perhaps also be put online?