Ren'Py Build large android project error

yozayozo

Newbie
Sep 14, 2021
18
2
I'm trying to build an android version for a large ren'py project. Managed to build an older project originating with 2.4GB that made .apk file with 2.4GB in size. It worked flawlessly on an older android device.

Now I'm trying to build a project which has 7.1GB, and the build always fails. No matter what I do. I've changed gradle properties and build configurations a ton, no success.

This is what the console returns for the non-expansion pack android build (no G-play) is the following:
Code:
error no expansion
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageRelease'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > value (4295384573) > 0x00000000ffffffffL

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:packageRelease'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:205)
    at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:203)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:184)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
    at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
    at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:372)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:359)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:352)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:338)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: org.gradle.tooling.BuildException: 1 exception was raised by workers:
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade

    at com.android.build.gradle.internal.scope.BuildElements$WorkersBasedScheduler$transform$2.call(BuildElements.kt:184)
    at com.android.build.gradle.internal.scope.BuildElements$WorkersBasedScheduler$transform$2.call(BuildElements.kt:148)
    at com.android.build.gradle.internal.scope.BuildElements$WorkersBasedScheduler.into(BuildElements.kt:157)
    at com.android.build.gradle.tasks.PackageAndroidArtifact.doTaskAction(PackageAndroidArtifact.java:413)
    at com.android.build.gradle.internal.tasks.NewIncrementalTask$taskAction$$inlined$recordTaskAction$1.invoke(AndroidVariantTask.kt:73)
    at com.android.build.gradle.internal.tasks.NewIncrementalTask$taskAction$$inlined$recordTaskAction$1.invoke(AndroidVariantTask.kt:34)
    at com.android.build.gradle.internal.tasks.Blocks.recordSpan(Blocks.java:91)
    at com.android.build.gradle.internal.tasks.NewIncrementalTask.taskAction(NewIncrementalTask.kt:34)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
    at org.gradle.api.internal.project.taskfactory.IncrementalInputsTaskAction.doExecute(IncrementalInputsTaskAction.java:32)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:42)
    at org.gradle.api.internal.project.taskfactory.AbstractIncrementalTaskAction.execute(AbstractIncrementalTaskAction.java:25)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.run(ExecuteActionsTaskExecuter.java:568)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:553)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:536)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$300(ExecuteActionsTaskExecuter.java:109)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:276)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:265)
    at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$0(ExecuteStep.java:32)
    at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:32)
    at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26)
    at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:63)
    at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:35)
    at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:49)
    at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:34)
    at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:43)
    at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73)
    at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54)
    at org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:34)
    at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:44)
    at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:54)
    at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:38)
    at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49)
    at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:153)
    at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:67)
    at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:41)
    at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:44)
    at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:33)
    at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38)
    at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:92)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:85)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:39)
    at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76)
    at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37)
    at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36)
    at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26)
    at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:94)
    at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49)
    at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:79)
    at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:53)
    at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:74)
    at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:78)
    at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:78)
    at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34)
    at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:39)
    at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:40)
    at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:28)
    at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:192)
    ... 30 more
Caused by: com.android.ide.common.workers.WorkerExecutorException: 1 exception was raised by workers:
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade

    at com.android.build.gradle.internal.tasks.Workers$WorkerExecutorAdapter.await(Workers.kt:190)
    at com.android.build.gradle.internal.scope.BuildElements$WorkersBasedScheduler$transform$2.call(BuildElements.kt:182)
    ... 98 more
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    at org.gradle.workers.internal.DefaultWorkerExecutor$WorkItemExecution.waitForCompletion(DefaultWorkerExecutor.java:354)
    at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForItemsAndGatherFailures(DefaultAsyncWorkTracker.java:142)
    at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForItemsAndGatherFailures(DefaultAsyncWorkTracker.java:90)
    at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForAll(DefaultAsyncWorkTracker.java:80)
    at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForCompletion(DefaultAsyncWorkTracker.java:68)
    at org.gradle.workers.internal.DefaultWorkerExecutor.await(DefaultWorkerExecutor.java:258)
    at com.android.build.gradle.internal.tasks.Workers$WorkerExecutorAdapter.await(Workers.kt:188)
    ... 99 more
Caused by: java.lang.IllegalArgumentException: value (4295384573) > 0x00000000ffffffffL
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:203)
    at com.android.tools.build.apkzlib.zip.ZipField.write(ZipField.java:280)
    at com.android.tools.build.apkzlib.zip.CentralDirectory.computeByteRepresentation(CentralDirectory.java:470)
    at com.android.tools.build.apkzlib.utils.CachedSupplier.get(CachedSupplier.java:72)
    at com.android.tools.build.apkzlib.zip.CentralDirectory.toBytes(CentralDirectory.java:400)
    at com.android.tools.build.apkzlib.zip.ZFile.computeCentralDirectory(ZFile.java:1440)
    at com.android.tools.build.apkzlib.zip.ZFile.recomputeAndWriteCentralDirectoryAndEocd(ZFile.java:1220)
    at com.android.tools.build.apkzlib.zip.ZFile.update(ZFile.java:1025)
    at com.android.tools.build.apkzlib.zip.ZFile.close(ZFile.java:1345)
    at com.android.tools.build.apkzlib.zfile.ApkZFileCreator.close(ApkZFileCreator.java:173)
    at com.google.common.io.Closer.close(Closer.java:214)
    at com.android.builder.internal.packaging.IncrementalPackager.close(IncrementalPackager.java:406)
    at com.android.build.gradle.tasks.PackageAndroidArtifact.doTask(PackageAndroidArtifact.java:739)
    at com.android.build.gradle.tasks.PackageAndroidArtifact.access$300(PackageAndroidArtifact.java:138)
    at com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable.run(PackageAndroidArtifact.java:884)
    at com.android.build.gradle.internal.tasks.Workers$ActionFacade.run(Workers.kt:242)
    at org.gradle.workers.internal.AdapterWorkAction.execute(AdapterWorkAction.java:50)
    at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:50)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:63)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:59)
    at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:98)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:59)
    at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44)
    at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
    at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:53)
    at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(DefaultWorkerExecutor.java:200)
    at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:215)
    at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164)
    at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:131)
    ... 3 more


* Get more help at https://help.gradle.org

BUILD FAILED in 4m 17s
142 actionable tasks: 24 executed, 118 up-to-date
And this is the error message if the build is done with selected expansion pack (not whole error log):

Code:
> Task :renpyandroid:compileReleaseJavaWithJavac FAILED
S:\renpy-7.4.8-sdk\rapt\project\renpyandroid\src\main\java\org\renpy\android\Constants.java:10: error: integer number too large: 2148198103
    public static int fileSize = 2148198103;
                                 ^
1 error

> Task :app:mergeReleaseResources

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':renpyandroid:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
Any ideas on what could be done? (hopefully no answers like "you must reduce your code" because images are already compressed as hell)
 
Last edited:

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
Invariably the answer to "my large android game failed to build" is increase the amount of memory available to the gradle application used in part to build the android app. It defaults to 2GB.

I believe you need to add this line to a file called gradle.properties.
Code:
org.gradle.jvmargs=-Xmx3g

Not sure where that file is stored... and it might not actually solve your problem... but it's a place to start.
I believe the 3g at the end of the line is "3GB". I guess it could be Xmx4g instead, if 3GB isn't enough.

Though given you've already said...

Now I'm trying to build a project which has 7.1GB, and the build always fails. No matter what I do. I've changed gradle properties and build configurations a ton, no success.

This might all be old news to you... and setting it as high as 8GB or 12GB may not work.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
My other usual suggestion, it if makes sense for your project, would be to split things up into Seasons or Chapters.
That is... create separate versions of the game, sized at around 2 to 3GB.

Delivering content like that would likely rely on a RenPy technique called . Where you copy all the variables that matter to a new structure based on the MultiPersistent() class at the end of each major version (chapter) of the game and then load that same data back in at the start of the next chapter.

The problem is... I'm multi-game persistence doesn't work on Android. And so there's no real way to share data between what are effectively separate games. Best you might hope for is to ask the player at the beginning of each chapter what key decisions they made in previous chapters. I vaguely recall a workaround being suggested, but I can't find the post that mentioned it.

On top of that, it's really only a technique that works for largely linear games. If your game is largely open world, then it may be hard to split the game into discrete sections.

And yeah... none of the really helps you. Just doing a brain dump, in case I get lucky.
 

yozayozo

Newbie
Sep 14, 2021
18
2
Thank you so much for the response.
Already tried setting gradle.properties to a maximum size my PC offers and that is 32g. It has no impact on the build.

I wish I could understand the error better, when researching it there are very few articles written about such an error. It says that some value is greater than 32bit max positive number(0x00000000ffffffffL --- 2147483647 --- 2*1024*1024*1024)
Therefore the error: value (4295384573) > 0x00000000ffffffffL
or more human readable: 4295384573 > 2147483647

But what value?
It isn't a single file since I've done a small loop against all the files in the folder, and the largest file has a size that is only 8 digits long, not even near 10 digit number of 2147483647.

My guess is that that it is the value of the final build which then exceeds the 32bit max positive number 2147483647

But then again, why is that an issue? Aren't games build for 64bit?
 

LightmanP

Well-Known Member
Modder
Game Developer
Oct 5, 2020
1,671
15,504
Why not just compress/downscale your images/videos? I don't play games on Android, but I feel like most people wouldn't really want to download a 7 gb app anyway...

Edit: saw you mentioned that they are already compressed, however, maybe you should try other types of compression/play around with the settings more. Are they like 4k or are you working with BaDIK number of images?
 

yozayozo

Newbie
Sep 14, 2021
18
2
Also shouldn't it work when an expansion file is used?
Is there a possibility to make the game download content once first fired?
 

yozayozo

Newbie
Sep 14, 2021
18
2
Why not just compress/downscale your images/videos? I don't play games on Android, but I feel like most people wouldn't really want to download a 7 gb app anyway...

Edit: saw you mentioned that they are already compressed, however, maybe you should try other types of compression/play around with the settings more. Are they like 4k or are you working with BaDIK number of images?
They are 1080p, but there is A LOT of them. Will surely look into compressing them even more. But I don't want to provide a bad experience on mobile with pixelish pictures
 

GNVE

Active Member
Jul 20, 2018
702
1,158
I use to compress. On it saves around 70% of you're filesize compared to standard Daz/Image editing software. I held original next to tinyfied image, zoomed in and could not discover any differences. Over the hundreds of images I have put through their algorithm only one got screwed up so far.
(By chance the image I chose actually has some noticable differences side-by-sid :p)
It's free to use up to a certain file size and number of images per time. But well worth the money in my opinion.
original 3,99MB:
Brianna 2_HD.png
tinyfied 1,28MB (32% of the original):
Brianna 2_HD.png
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,490
7,035
The key point here is this part of the error tree:
Code:
java.lang.IllegalArgumentException: value (4295384573) > 0x00000000ffffffffL
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:203)
    at com.android.tools.build.apkzlib.zip.ZipField.write(ZipField.java:280)
The tools are trying to create the APK file, but some portion of what's going into the APK file is bigger then 4 Gigabytes. Basically, Android just doesn't support objects which are that large. (I'm guessing that this is an "images.rpa" or "archive.rpa" or something like that.)

Also shouldn't it work when an expansion file is used?
Here, we're not talking about the total size of the game, but (it appears) the size of one particular object. It's remotely possible that if you're currently packaging things up to an "images.rpa" or "archive.rpa" that you could make it work if you don't bundle things into an rpa file - that way the maximum object size would be much lower.

Is there a possibility to make the game download content once first fired?
Yes, it certainly is possible. Many games do that. Whether it's practical or not is another matter. You'd have to:
  1. Have a server somewhere from which you could download the objects.
  2. (Probably) put some logic in the splashscreen area that would check to see if you had the expected files already downloaded, and download them if they weren't. After downloading, you'd then have to restart Ren'py so that it would go back and recognize the additional files.
  3. Provide some kind of feedback to the user during the download process, since it's going to take a while to download that much content.
If you're good enough with Python, that could be done. (It would probably involve multi-threaded code so that you could provide the UI components through Ren'py while the downloads are going on.)

But I strongly suspect that the majority of your Android users are not going to want game that takes that long to download and consumes that much space on their devices.

Just my $0.02