I am building a old large a large project in Android Studio, but failed.

I have a large project that contains a large amount of assets. When I export it as Android Studio project and try to build it, it failed and Android Studio shows me the message below:

Task :packageDebug FAILED

Execution failed for task ‘:packageDebug’.

A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
Zip64 required but forbidden (#entries=99042, cd=(offset=1,324,136,472, size=9,324,844))

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

It seems like the project is too large so the zip 32bit can not handle this, but I don’t know how to enable “Zip64”.I’ve tried to search someone who is facing this problem in google, but there is no helpful result. Can someone help me?

Environment informations:
Unity 5.6.3f1
Android Studio 2021.2.1
Android Gradle Plugin Version 4.2.0
Gradle Version 7.1
compileSdkVersion 30
buildToolsVersion ‘30.0.3’
targetSdkVersion 30

First see if you can build a blank project. If you can’t, then fix your Unity / Android SDK / NDK / JDK and toolchain installation.

If you CAN build a blank project, well, the problem lies in one of the files in your project. You could google more for the error above to see what code is likely to trigger that, or you can bisect from an empty project upwards, adding folder after folder of your game, temporarily fixing compiler errors resulting from incomplete copying, and see when it stops building.

When it stops building, the last thing you added will be the culprit. If that thing is massive, subdivide it further.

But I’d start with googling for the error first, once you prove your toolchain works.