Search Issue Tracker

Fix In Review for 2021.2.X

Fixed in 2020.3.X, 2021.1.X

Fix In Review for 2019.4.X

Votes

36

Found in

2020.1.3f1

Issue ID

1272592

Regression

Yes

[Android] Build fails when there are 680 or more files in the Streaming Assets folder

Mobile

-

Reproduction steps:
1. Download and open the user-submitted project "BuildStreamingAssets2020.zip"
2. Build the project

Expected result: Build is successful
Actual result: Build fails

Reproduces on: 2020.1.0b14, 2020.1.6f1

Does not reproduce on: 2019.4.11f1, 2020.1.0b13, 2020.2.0a1, 2020.2.0b3

Error message:
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Notes:
Does not reproduce on iOS
____
This is a problem outside of Unity, reported to Android Studio:
https://partnerissuetracker.corp.google.com/issues/177236664

A workaround would be to use custom Gradle files and specify the file extensions. By default we specify few extensions and list all the files from streaming assets. Instead of listing streaming assets you can specify the file extensions. The downside with that is that all files with such extension will be uncompressed including those outside of streaming assets.

  1. Response avatar

    Resolution Note (fix version 2021.2):

    This is a problem outside of Unity, reported to Android Studio:
    https://partnerissuetracker.corp.google.com/issues/177236664

    A workaround would be to use custom Gradle files and specify the file extensions. By default we specify few extensions and list all the files from streaming assets. Instead of listing streaming assets you can specify the file extensions. The downside with that is that all files with such extension will be uncompressed including those outside of streaming assets.

  2. Response avatar

    Resolution Note (fix version 2021.1):

    Fixed in 2021.1.9f1

  3. Response avatar

    Resolution Note (fix version 2020.3):

    Fixed in 2020.3.13f1

Comments (22)

  1. 6b3acd70b6825ac566ead97cc7c3c332?d=mm

    MarcSpraragen

    Jun 28, 2021 20:42

    I'm doubting Unity's "Fixed" updates.

    Version 2020.3.13f1 is not apparently available to download. And, we are using Unity 2020.1.10f1 and getting this error

  2. 822e4697df50938b3cf96c63009da241?d=mm

    YangEGG

    May 31, 2021 15:32

    Thank you TIANZHIZHI.
    it works for me!!

  3. D14396b415d1e99d2f60a6eb966a35c3?d=mm

    Koji-Nakamaru

    May 18, 2021 02:58

    I've solved the issue by applying the following diff:

    --- ./2020.3.6f1/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/launcherTemplate.gradle.bk 2021-05-06 17:45:29.000000000 +0900
    +++ ./2020.3.6f1/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/launcherTemplate.gradle 2021-05-06 17:46:10.000000000 +0900
    @@ -27,7 +27,7 @@
    }

    aaptOptions {
    - noCompress = ['.ress', '.resource', '.obb'] + unityStreamingAssets.tokenize(', ')
    + noCompress = ['.ress', '.resource', '.obb', '.bundle']
    ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
    }**SIGN**

  4. D14396b415d1e99d2f60a6eb966a35c3?d=mm

    Koji-Nakamaru

    May 18, 2021 02:54

    I've solved the issue by applying the following:
    https://gist.github.com/KojiNakamaru/c99b0c092a010b7adfa64d87ab88018e

  5. 47aa0b0ca905722c3f5a8e34b88397e8?d=mm

    Alanmars0214

    May 14, 2021 07:11

    I have the same issue with Unity 2019.4.20f1c1

  6. 3adebc2ffb788a8c8c79c1c9513108aa?d=mm

    Martinez-Vargas

    May 12, 2021 17:40

    I have exactly the same problem in Unity 2020.3.7, I am using the firebase plugin downloaded from the unity package manager. Could anyone solve this?

  7. 14808dd73aa020b94db8bf0ca279a42f?d=mm

    KrcKung

    May 08, 2021 11:17

    Thank you TIANZHIZHI for posting the solution. Really appreciate it.

  8. C64ce0288e70fa1035829a4dcdba1ffd?d=mm

    HoneyButterAlmond

    Apr 15, 2021 00:51

    Thank you TIANZHIZHI.
    it works for me!!

  9. 821269e258771ac107a8a45057bd9ab7?d=mm

    tianzhizhi

    Apr 14, 2021 08:05

    This is a compatible bug between com.android.tools.build:gradle:3.6.0 and unity 2020, Please do following step to resolve:

    1, Edit -> Player Setting -> Publishing Settings, click "Custom Base Gradle Template" blew the Build section.

    2, You will find a "Assets\Plugins\Android\baseProjectTemplate.gradle" file was generated, open it by text editor.

    3, change
    "classpath 'com.android.tools.build:gradle:3.6.0'"
    into
    "classpath 'com.android.tools.build:gradle:3.4.0'"

    Build again, and don't forget to add it to your CVS.

    If you get solved and like this solution, please do me a favor to mark a star for this repo:
    https://github.com/yasio/yasio

    This repo's author find this solution and he told me.

  10. D00bbfb201e42061355c441e1d7ac241?d=mm

    Ceylan12

    Apr 13, 2021 12:55

    I have the same problem with Unity 2020.3.3f1.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.