Error Building Game in SDK

I am trying to build my game in the SDK, and I am getting this error causing the build to fail:

Problem creating jar: archive's size exceeds the limit of 4GByte. (and the archive is probably corrupt but I could not delete it)

Here’s the full output after an attempted clean & build:

ant -f C:\\Users\\ryan\\Desktop\\JM\\Mystical_Woods\\Mystical_Woods -Dnb.internal.action.name=rebuild clean jar
Building jar: C:\Users\ryan\Desktop\JM\Mystical_Woods\Mystical_Woods\build\assets.jar
C:\Users\ryan\Desktop\JM\Mystical_Woods\Mystical_Woods\nbproject\assets-impl.xml:5: Problem creating jar: archive's size exceeds the limit of 4GByte. (and the archive is probably corrupt but I could not delete it)
BUILD FAILED (total time: 5 minutes 8 seconds)

I’ve had this error before, and I can get around it and build successfully if I reduce the size of my assets folder below 4gb. But i am wondering the source of the error that’s stating “the archive is probably corrupt” and if that is something I can fix- and also if I can change something so I can have more than 4gb in my assets folder as well.

Any help is appreciated :slightly_smiling_face:

1 Like

You might need to enable Zip64 in your build tool to pass the 4GB limit.

1 Like

That’s a lot of assets. Is it including everything or just the assets you will actually use?

When I used the SDK 6 or 7 years ago, I remember always having to tweak the filtering so it didn’t zip up things like .PSD, .blend files, etc… Just the images, fonts, and j3os.

1 Like

I include everything in the assets folder. There’s also a lot of things I don’t use, some unecissary backups that probably shouldn’t be in my assets folder, and images that I downloaded in high resolution and never scaled down - so thankfully my real asset usage isn’t actually 4gb.

I did not know that was possible. I also have some blend files and other random file types that have cluttered up my asset folder over time. By default, it looks like the SDK excludes a handful of file types like .blend, .mesh, and other ones common to the engine, and I added some other types I’m using as well.

I don’t see anything about Zip64 in the properties for my game in the sdk, but I did notice that I had “Compress Assets JAR” unchecked - and checking it solved the build error. Is this essentially the same thing as enabling Zip64?

1 Like

Do not know, I do not think so. But anyway if you use Ant, the minimum version must be 1.9.1 to be able to use Zip 64. So if SDK uses something below than 1.9.1 then the “Compress Assets JAR” option must be something else I believe.