Android Build Fail [Error building Player: CommandInvokationFailure: Failed to align APK package]

Hi There,

I’m having some issues with my build.

I keep getting this error on the last video I’ve added to the App.

I have several videos already in and coded but the 6th/last one keeps giving me this error. I’ve tried different formats for the videos, different videos etc…

It’s the same code over and over again for the movies but for some reason the last one results in a build failure with:

"Error building Player: CommandInvokationFailure: Failed to align APK package. See the Console for details.
D:\Android SDK DEV\adt-bundle-windows-x86_64-20140702\sdk\build-tools\android-4.4W\zipalign.exe 4 “D:\Unity3D Work\Unity3D Projects\Systech App\Temp/StagingArea/Package_unaligned.apk” “D:\Unity3D Work\Unity3D Projects\Systech App\Temp/StagingArea/Package.apk”

stderr[
Unable to open ‘D:\Unity3D Work\Unity3D Projects\Systech App\Temp/StagingArea/Package_unaligned.apk’ as zip archive
]
stdout[

]"

The Code that repeats 6 times in OnGui()

“if (GUI.Button(new Rect(512, 1216, 608, 96), “Visualization Reel”)){
audio1.clip=sound1;
audio1.Play();
Handheld.PlayFullScreenMovie (“DXB.mp4”, Color.black, FullScreenMovieControlMode.CancelOnInput);
}”

And it’s the last video, the 6th one that does it. I can build it fine with the other 5 in just as soon as I add the last BAM, Build Fail.

I’ve checked the code nothing missing brackets all where they need to be etc… I have no idea what it could be.

I’ve tried adding the zipalign in sdk/tools etc… nothing.

Any and all help will be much appreciated. Cheers.

I’ve narrowed this down to my video files. Is there a limit to the amount you can put in an app? file size limit? I can get 5 videos in and then the build fails.

Any ideas guys?

Likely to be an issue with the amount of RAM allocated to the java process for building the APK, it feels as if while compiling the resources the java process quit without warning and is incomplete which would result in the zipalign process not being able the align the binaries to compress it.

I suggest that you stream in the videos instead of including them in your build to free up the resources required when building the apk. Anyways, the play store has a limit of 50 mb.

http://answers.unity3d.com/questions/1352901/how-can-i-solve-this-commandinvokationfailure-fail.html