Failing to build for Android: SIZE LIMITS?

Dear all,

This is the problem, failing to build for Android with:

Failed to build APK Warning: Could not find file /var/folders/z2/tmfqnf0n065gqm\_n6vjktjkh0000gn/T/1402569578/MyCoronaActivity-signed-aligned.apk to copy.

Now I’ve tried to use my key, and it fails, I built it with the debug key, and it fails.

I’ve resorted to take a look at the directory where this process is going on. I found the following files:

% ls -lh /var/folders/z2/tmfqnf0n065gqm\_n6vjktjkh0000gn/T/1402569578 total 7785400 -rw-r--r-- 1 senseiwa staff 1.6G Jun 12 12:45 MyCoronaActivity-signed.apk -rw-r--r-- 1 senseiwa staff 2.1G Jun 12 12:43 MyCoronaActivity-unsigned.apk -rw-r--r-- 1 senseiwa staff 319B Jun 12 12:39 build.properties -rw-r--r-- 1 senseiwa staff 377B Jun 12 12:39 config.lu -rw-r--r-- 1 senseiwa staff 23K Jun 12 12:39 contents.lu -rw-r--r-- 1 senseiwa staff 40K Jun 12 12:39 director.lu -rw-r--r-- 1 senseiwa staff 53K Jun 12 12:39 input.zip -rw-r--r-- 1 senseiwa staff 1.3K Jun 12 12:39 logo.lu -rw-r--r-- 1 senseiwa staff 1.1K Jun 12 12:39 main.lu -rw-r--r-- 1 senseiwa staff 4.2K Jun 12 12:39 menu.lu drwxr-xr-x 8 senseiwa staff 272B Jun 12 12:39 output/ -rw-r--r-- 1 senseiwa staff 3.4M Jun 12 12:39 output.zip -rw-r--r-- 1 senseiwa staff 1.3K Jun 12 12:39 platform.lu -rw-r--r-- 1 senseiwa staff 7.6K Jun 12 12:39 quiz-choice.lu -rw-r--r-- 1 senseiwa staff 7.5K Jun 12 12:39 quiz-drag.lu -rw-r--r-- 1 senseiwa staff 2.2K Jun 12 12:39 quiz-test-choice.lu -rw-r--r-- 1 senseiwa staff 1.9K Jun 12 12:39 quiz-test-drag.lu -rw-r--r-- 1 senseiwa staff 11K Jun 12 12:39 quiz-text.lu -rw-r--r-- 1 senseiwa staff 2.7K Jun 12 12:39 quiz.lu -rw-r--r-- 1 senseiwa staff 5.9K Jun 12 12:39 scratch.lu -rw-r--r-- 1 senseiwa staff 9.7K Jun 12 12:39 scrollNav.lu -rw-r--r-- 1 senseiwa staff 8.2K Jun 12 12:39 scrollmenu.lu -rw-r--r-- 1 senseiwa staff 2.8K Jun 12 12:39 showtexts.lu -rw-r--r-- 1 senseiwa staff 3.4M Jun 12 10:40 template.apk -rw-r--r-- 1 senseiwa staff 5.8K Jun 12 12:39 ui.lu -rw-r--r-- 1 senseiwa staff 1.8K Jun 12 12:39 utils.lu -rw-r--r-- 1 senseiwa staff 7.5K Jun 12 12:39 zoom.lu

Notice the " MyCoronaActivity-unsigned.apk" file, and the " MyCoronaActivity-signed.apk" one. The latter kept growing in size until the error appeared. Then, Corona deleted the whole temporary directory, and I could not retrieve the contents after the failure for further inspection. 

My application contains several videos, and it built successfully before I added them all! The videos are ~1.16GB collectively, with a maximum size of 120MB.

Now, just for the fun of it, I’ve moved my videos outside the project root, so I have an apk of ~1GB, and it freaks me out because it built successfully. The freaking part? I’ve successfully built another application with a comparable size and video number a couple a years ago, flawlessly.

I’ve added some videos, next, just to see if it builds, and it does! Notice as the apk gets both signed and aligned, builing a successful apk on my desktop.

% ls -lh /var/folders/z2/tmfqnf0n065gqm\_n6vjktjkh0000gn/T/1402570910 total 9697896 -rw-r--r-- 1 senseiwa staff 1.5G Jun 12 13:06 MyCoronaActivity-signed-aligned.apk -rw-r--r-- 1 senseiwa staff 1.5G Jun 12 13:05 MyCoronaActivity-signed.apk -rw-r--r-- 1 senseiwa staff 1.5G Jun 12 13:04 MyCoronaActivity-unsigned.apk -rw-r--r-- 1 senseiwa staff 319B Jun 12 13:01 build.properties -rw-r--r-- 1 senseiwa staff 377B Jun 12 13:01 config.lu -rw-r--r-- 1 senseiwa staff 23K Jun 12 13:01 contents.lu -rw-r--r-- 1 senseiwa staff 40K Jun 12 13:01 director.lu -rw-r--r-- 1 senseiwa staff 53K Jun 12 13:01 input.zip -rw-r--r-- 1 senseiwa staff 1.3K Jun 12 13:01 logo.lu -rw-r--r-- 1 senseiwa staff 1.1K Jun 12 13:01 main.lu -rw-r--r-- 1 senseiwa staff 4.2K Jun 12 13:01 menu.lu drwxr-xr-x 8 senseiwa staff 272B Jun 12 13:02 output/ -rw-r--r-- 1 senseiwa staff 3.4M Jun 12 13:02 output.zip -rw-r--r-- 1 senseiwa staff 1.3K Jun 12 13:01 platform.lu -rw-r--r-- 1 senseiwa staff 7.6K Jun 12 13:01 quiz-choice.lu -rw-r--r-- 1 senseiwa staff 7.5K Jun 12 13:01 quiz-drag.lu -rw-r--r-- 1 senseiwa staff 2.2K Jun 12 13:01 quiz-test-choice.lu -rw-r--r-- 1 senseiwa staff 1.9K Jun 12 13:01 quiz-test-drag.lu -rw-r--r-- 1 senseiwa staff 11K Jun 12 13:01 quiz-text.lu -rw-r--r-- 1 senseiwa staff 2.7K Jun 12 13:01 quiz.lu -rw-r--r-- 1 senseiwa staff 5.9K Jun 12 13:01 scratch.lu -rw-r--r-- 1 senseiwa staff 9.7K Jun 12 13:01 scrollNav.lu -rw-r--r-- 1 senseiwa staff 8.2K Jun 12 13:01 scrollmenu.lu -rw-r--r-- 1 senseiwa staff 2.8K Jun 12 13:01 showtexts.lu -rw-r--r-- 1 senseiwa staff 3.4M Jun 12 11:02 template.apk -rw-r--r-- 1 senseiwa staff 5.8K Jun 12 13:01 ui.lu -rw-r--r-- 1 senseiwa staff 1.8K Jun 12 13:01 utils.lu -rw-r--r-- 1 senseiwa staff 7.5K Jun 12 13:01 zoom.lu

Putting the rest of the videos in the original folder, results in failure.

So my question is, is there some size limit on Android applications? I am not using expansions right now, I need debugging on a real device, so a simple 2GB apk is perfectly fine with me.

Thanks!

Update: I am manually signing, and it works.

The problem is  zipalign , that seems to fail. Moreover, building with expansion pack seems to work, although I put some random letters in the key… I have no idea what the licensing key is! :frowning:

For build in order to run I had to delete something, not good at all…

A 2+GB app sounds rather big.  It’s also crossing the boundary of what a 32 bit signed integer can hold, so I could see where something might not be tested with files that size.  You will need to use expansion modules for Google Play anyway.

This tutorial may help: http://thatssopanda.com/corona-sdk-tutorials/using-expansion-files-with-android-and-google-play/

Rob

Thanks Rob!

Yes, that was my guess too, but it’s quite annoying! I wouldn’t use signed 32 bit integers for file sizes, especially while  size_t is clearly defined as an unsigned integer. I must be careful!

However, thanks for your tutorial, now I see what the key is! :slight_smile:

Cheers!

Update: I am manually signing, and it works.

The problem is  zipalign , that seems to fail. Moreover, building with expansion pack seems to work, although I put some random letters in the key… I have no idea what the licensing key is! :frowning:

For build in order to run I had to delete something, not good at all…

A 2+GB app sounds rather big.  It’s also crossing the boundary of what a 32 bit signed integer can hold, so I could see where something might not be tested with files that size.  You will need to use expansion modules for Google Play anyway.

This tutorial may help: http://thatssopanda.com/corona-sdk-tutorials/using-expansion-files-with-android-and-google-play/

Rob

Thanks Rob!

Yes, that was my guess too, but it’s quite annoying! I wouldn’t use signed 32 bit integers for file sizes, especially while  size_t is clearly defined as an unsigned integer. I must be careful!

However, thanks for your tutorial, now I see what the key is! :slight_smile:

Cheers!