How to solve XAPK Validation Failed?

So I am testing out an early access build of a game I built and which I had a problem at first but then it was working on the developer debugging built. However now its not working again…

Now when I launch it on the official game build to test it I am getting stuck this time on APK File Validation Failed.

Has anyone with this issue been able to successfully fix this issue? I’m a little confused and would appreciate some advice on fixing it if possible.

So far the most I’ve found is trying to rebuild the game and checking things mentioned here further Reducing APK Package Size | Unreal Engine Documentation but my app already sits at about 38.5mb with simple meshes and textures in there. I used fbx meshes from models I made in Blender and Materials I created in UE4 but other than default settings so I’m not sure what else the issue can be.

I don’t have a save game option in the game but maybe adding it would that fix it maybe? I am reading and noticing some mentions of obb save file but I don’t quite understand that or maybe its related to a storage issue but the app has storage access so I’m not sure what to check there and am trying to figure that out for an update to resolve it.

Any advice or help is greatly appreciated.

Yes that is a storage issue. XAPK is a combined file format consisting of the .apk installation package and the OBB data file. I think your OBB is being placed incorrectly. When the game loads up it is looking for the OBB but does not have the permissions to find it. Your app doesn’t ask for permissions and hence you get the Validation Failed Error message. Make sure you have checked the use ExternalFilesDir in your project settings and that should hopefully solve the the validation error or give you a message asking for storage permission.


Still quite strange, since you manually turned on the storage permissions, you shouldn’t be running into the validation issue. Can you check if your OBB file is in your Android/obb folder?

Thank you very much @Xenobl4st and I really appreciate the screenshot. I will go double-check that one right now.

@Xenobl4st Unfortunately that didn’t seem to do anything. It got stuck on the ue4 splashscreen which i left in there and then I tried a clean install (uninstall and reinstall) then ran into the xapk issue. The odd thing though that I noticed is Storage after that is now showing as disabled which is really weird.

I was digging around and found something about someone unticked and reticked the .pak box which did the trick so I’m gonna try reticking both boxes.

If not, the issue persists (most likely because I have the worst luck with almost everything) then i’ll check to see if the OBB File is in there, however, I am under the impression that should be in the game folder in android? I’m not quite sure how to check that so i’ll have to figure it out.

That’s unfortunate. I also had another look into this problem and it seems it has been around for a while. There doesn’t seem to be an actual fix for it. In the forums Loreliya has listed some solutions but it doesn’t look like the issue was ever resolved:

Let me know if the .pak box solved it and yes, also check if the OBB file is there because it might be throwing up the error if you don’t actually have an OBB file. I have mostly worked with iOS so I don’t have much experience with Android but if those solutions don’t work it looks like a bug and may need to be fixed in Unreal Engine. It might be worth submitting a bug report to Epic Games:

Alright, thank you for the assistance this far, I really greatly appreciate that. I tried the pak box thing that I found per someone elses thread but that didn’t work out so either I’m doing something wrong or that’s just more proof that there’s an underlying problem somewhere. I’m hoping 4.25 will fix it because it seems like its getting rid of codeworks entirely and going straight android studio from what I was reading so maybe that’s a related cause in effort of resolving the issue. I thought about trying the 4.25 preview but im not sure how stable it is so I was waiting it out a bit longer. I’m about to the point where if I don’t figure it out then I may have to just can the project and future mobile ideas in ue4 until I figure something else out for that which is aggrevating. Oh well…

i just had this problem a week ago, cant remember exactly how it got it to work, but i believe theres a checkbox to disregard obb validation or something along those lines, theres also one that says to include large pak files which i think had to check on, and uncheck the one xenoblast mentioned. also when installing, rather than use the batch script, just drag the apk file directly on your phone, then double click it on the phone to install it

Hmm, okay thanks, I will give that a try. I think I only have the one box selected because I thought using that other one would make the apk file too big or something but I’ll go look at it again in a bit.

just made this tutorial due to how many android related issues ive seen on answerhub the past few days, this should fix your issue :slight_smile: UNREAL ENGINE 4.24 TUTORIAL: HOW TO PACKAGE YOUR GAME FOR ANDROID - YouTube

Yep, that worked man! You’re a lifesafer! I’ll send a donation to you as soon as I can as thanks! The xpk issue went away completely! :smiley:

Unfortunately though, packing the obb into the the apk made me realize I’ve gotta figure out how to either compress the game more for usage on google play, figure out how the heck I can reduce it more (I’ve found some stuff on this but I think I am gonna have to rebuild my project to reduce it further which is a bit frustrating but oh well) or find out how to break it into installed chunks or something is something I will have to learn as well at some point for bigger projects anyhow.

The reason I stated that is because my apk without that sits at about 39.18mb and I noticed originally that the obb file for some weird reason spikes up to 718mb, not sure why but I’m gonna have to try to figure out how to reduce that way down or clean it up somehow.

Anyways, thank you everyone here for all your help and I’ll add you guys to the game credits! :slight_smile: