Download

Crash on Load on Android with main.obb.png not found

Hello,

I have deployed the apk for USA and International version of Samsung S7, and Nexus 6, Nexus 4 etc. On the international S7, everything working, however, when I deploy on other devices (USA S7, Nexus 6, Nexus 4), I get a similar error saying the

D/UE4(15590): Assertion failed: nullptr != File [File:E:\UnrealEngine-4.10\Engine\Source\Runtime\Core\Private\Android\AndroidFile.cpp] [Line: 1704]

By modified the code a bit, it seems that game cannot find a file

Android model is Nexus 6
OS language is set to en_US
==============> GameActive.onCreate complete!
OnAppCommandCB cmd: 10
LogAndroidEvents: EnqueueAppEvent : 9, 0
==================================> Inside onStart function in GameActivity
App is running in Landscape
OnAppCommandCB cmd: 11
==============> Resuming main init
LogAndroidEvents: EnqueueAppEvent : 7, 0
Final commandline: 
Created sync event
FAndroidPlatformFile::Initialize(..)
FAndroidPlatformFile::OpenRead('main.obb.png')
FAndroidPlatformFile::PathToAndroidPaths('main.obb.png') => AndroidPath = 'main.obb.png'
FAndroidPlatformFile::PathToAndroidPaths('main.obb.png') => LocalPath = '/storage/emulated/0/UE4Game/MyGame/main.obb.png'
FAndroidPlatformFile::PathToAndroidPaths('main.obb.png') => AssetPath = 'main.obb.png'
Assertion failed: nullptr != File [File:E:\UnrealEngine-4.10\Engine\Source\Runtime\Core\Private\Android\AndroidFile.cpp] [Line: 1704] 

while I turn on OBBInAPK to true. Then I try to compare the installation location differences on difference device, on the international S7 version (which is working fine), I can find a folder under
\sdcard\UE4Game\MyGameName\MyGameGame\

but on the USA S7, Nexus 6 or Nexus 4, I cannot find such folder, which I suspect the reason the fail to find file error come from. Can someone provide any information regarding how is the Unreal app installation location on Android works? And why on different devices, it seems the installation location is difference? Also, where is the main.obb.png suppose to be?

When package data in APK is selected (OBBInAPK true), the OBB is renamed to end with .png and moved to the assets directory. The .png extension prevents it from being compressed again. AAsetManager is used to access the file (AssetPath). What size is the main.obb.png in the APK? You can open the APK as a ZIP file.