4.7 Android Shipping crash on launch

As reported in the forum thread by me and other person, the shipping build app still crashes on startup on the just released 4.7 Version:

The development build runs but shipping build crashes on startup on my Galaxy S4.

In my case its a project converted from 4.51 which is already released in the play store:


I attached the logcat for the crash.

The crash appears even I make an empty new level and set this as a startup level.

link text

Hello spaceharry,

Thank you for reporting this issue. I am working to reproduce the problem. If you don’t mind, I have a few questions. Can you let me know what texture compression you are packaging your project for (if you are not using ALL)? Also, are you testing this directly on a physical Galaxy S4, or are you using an emulator?

In the meantime, I noticed a persistent error in your logcat: ‘E/DataRouter( 274): Opening of the USB File failed fd is -1 & errno is 2’. Error code 2 I believe is File/Directory not found, so you might consider updating Eclipse and any relevant drivers to the latest version.

Any further info you can think of to add would be very helpful. Thanks very much!

[Further info]

I tested it now with a new 3rd Person template in 4.7, and shipping build works on my galaxy s4. So it maybe has to do something with the conversion of the project. But…

Also I made a 3rd Person template in 4.51 and converted it to 4.7 and this also works. So its maybe specifically related to my project. Altough, others had the same problem too with their project conversion as you can see in the forum link in the first question above.

My Project had following conversions: 4.3->4-5->4-6. So I didnt test all conversion steps for a test template 3rd person.

The crash happens right after the first Google Play Login appears. I can still sign in into Google Play but the app stays dark. So it might be related to the Google Play Problem reported here

In the final apk package operations I get those 3 errors (both on the test project that works and on mine which doesnt), are they also safe to ignore?

MainFrameActions: Packaging (Android (ETC1)): [proguard] Warning: can’t write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [classes.jar:META-INF/MANIFEST.MF])
MainFrameActions: Packaging (Android (ETC1)): [proguard] Warning: can’t write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [vrlib.jar:META-INF/MANIFEST.MF])
MainFrameActions: Packaging (Android (ETC1)): [proguard] Warning: can’t write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [android-support-v4.jar:META-INF/MANIFEST.MF])

  • As my project is bigger than 50mb, it uses a obb file. I didn’t test this for the template which works. Maybe expansion file related?

Hey Spaceharry,

I had the exact same problem (as do alot of people when converting their project from 4.6 to 4.7) and I managed to find a fix and get it working late last night :smiley:

To Fix (do a backup of your project first just in case :wink: ):

  • in your already converted project folder delete the following subdirectories: binaries, build, intermediate, saved (you probably only need to do build and binaries but I did all just to be sure :wink: )
  • Now open your project in UE4
  • You will need to re-enable your Android packaging settings under Project Settings - Android
  • You will need to readd your keystore file in Build → Android

Then it works again in shipping mode and distribution mode! :slight_smile:

The problems I’m still having with 4.7:

  1. Leaderboards and Achievements work only after the first build after doing the process above. Every build after that they no longer work - no idea why. Also not working for the TappyChicken4.7 content example project (https://answers.unrealengine.com/questions/177947/470-android-leaderboards-and-achievements-no-longe.html)
  2. Filesize is an extra 15meg or so! So even after doing my usual trick of deleting the common and fonts folder from the engine’s slate folder I cannot get it under 50meg anymore. Would be great if Epic could tell us how they got TappyChicken 4.7 in the play store down to 25meg as if I export the example project it’s also over 50meg
  3. The automatic manifest processes adds vendor billing permissions which means all apps gets the ingame purchases label - this is really bad for games without that in my opinion and puts users off downloading it

hey aussieburger,

Tanks, but unfortunately this fix didn’t work for me. I deleted all the folders, still crash on startup. Only change is that now the Google Login screen doesn’t even appear anymore: The app won’t start and exits with “Unfortunatly, … has stopped”.

May I asked what directories you put in Android SDK project settings. For example for Android SDK did you put the one from NVPack Folder (tegra tools) or from a seperatly downloaded SDK? Did you add some activity or applications changes in the project settings?

Maybe I really have some outdated driver somewhere. When I have some time on the weekend I might do a complete new install of everything.

Btw, there is another trick for smaller apk size with setting the texture group max resolution as low as possible, as far as I can remember. But still for the size of tappy chicken other things are needed or sure.

Hey spaceharry,

I left the Android SDK project settings blank/default (so it uses) the path variables

I added nothing for the activity and applications inputs since after I manually pulled apart the APK (How to unpack / pack an APK file - Adventures of an Entrepreneur), I noticed the engine is now automatically adding everything you need (including the billing permission which means you app is now always marked as having inapp purchases)

Are you sure you:

  • Reconfigured all the android settings in the project settings after deleting those folders?
  • copied your keystore over correctly?
  • verified the app was signed correctly via the command line?
    jarsigner -verify -verbose -certs my_application.apk

Where do u set the texture group max resolution? And what values do u use?

Spaceharry, does Shipping but non-Distribution work?

We can also try Development + Distribution, but it takes a command line build to do it. If you find the call to BuildCookRun in your log, you can grab the command line and run it with Development and -distribution. I can help more if you want to try it.



Yes Shipping but non-Distribution works. I tried this before in the other thread you helped me. It couldnt find some files at that time:

Edit: So yeah some guidance would be awesome :slight_smile:

@aussieburger Yes I did all of that. And on top of that, when I delete the folders you mentioned I can’t even make it run anymore on development build.
Its in one of the Engine.ini files I think. I set most of them to 256 max resolution. When I did this the first time I could shrink the file size, but since its some time ago, I am not sure if it was only this what did the trick. Just search for TextureGroup in the ini files and you will find it.

I just checked if this is really a problem with 4.7 or 4.71, so I installed 4.61 to check if distribution build works there after conversion. And yes it works. So I still dont know whats causing the crash with 4.7.

And yes I can confirm that package size is about 30 mb bigger withouth changing anything properties from 4.5 to 4.7.

Okay, we need to get you a Distribution but non-Shipping build to test. I will get someone to figure out the exact command line and reply here.


Thank you.


The easiest way to find out the command-line to use is to run File|Package Android with Distribution enabled. In the output log, there will be a line which says:


You will want to run the RunUAT.bat batchfile in Engine/Build/BatchFiles and then take everything on the line from BuildCookRun, but change




That will be the command-line you need to build and package the game to the directory you had selected in the editor, but for Development instead of Shipping. Give that a try and let post back any issues. If you have trouble finding the BuildCookRun portion, post the output log from the run attempt and I can get it for you.


Thanks for checking in with this! I tried to make it run from a admin dos shell from within the BatchFiles directory but it keeps giving me errors for not finding the project.

First I thought its because there are spaces and points in the path to the directory, so I tried using double quotes and stuff to make the command work. In the file I attached there are some of the attempts I tried to make it work.

Maybe I set some of the double quotations at the wrong place? Also I tried to rename the directory for the project so there are no points or spaces left in the path, but it still gives me the same errors.

It would be nice from you to have a look at it.

link text

Deleting the folders, build, binaries, intermediate, and saved didn’t work for me, however, I did finally manage to get the shipping build to run. Unfortunately, it’s a bit of a frustrating process.

  1. I moved my project file out of the unreal projects folder.

  2. I created a new project with the same name as my old one.

  3. I then copied all of my content to the new project.

  4. I had to then manually re-setup the project settings.

  5. to get my c++ code to the new project, I had to first make sure the project generated the visual studio files, then I copied all my source code to the new project source directory. Once the source code was copied, I was able to go into visual studio and use the “add existing” option to add the code to the directory. From there it properly loaded the code into the project. Make sure to re-set up the google play services if you’re using them.

I know it’s not technically a fix for the bug and more of a bypass, but it sure is nice knowing it works now. I hope that helps.

I have the same issue. In 4.7.0 everything works (well kind of, because startup movies are a mess) but I can not start a shipping for distribution build. Other builds work (debug game, development and shipping -without distribution-).

Shipping with distribution I get black screen and after a while death -as reported by OP-.

I attach a backtrace in case it could help:
NOTE: This is WITHOUT using any movie for startup, but the movieplayer seems to be the fault class.
Could be related with another bug I post (movie player crash my game) ?

I can confirm this happens in my both android devices: Samsung Galaxy S3 and G-Star 9000 (mediatek processor).

Both have a similar backtrace, failing around FJavaAndroidMediaPlayer. I repeat, I do not use startup movies and it does work in other build optioins (debug, development and shipment without ticking the for distribution checkbox)

Okey I found the issue and fixed my game!

the OP should check but I’m almost sure is the same problem.

I have seen in the log this:
03-07 13:50:53.095 6484 6501 W System.err: java.lang.ClassNotFoundException: Didn’t find class “com/epicgames/ue4/MediaPlayer14” on path: DexPathList[[zip file “/data/app/com.mukagames.savetheprincess-1.apk”],nativeLibraryDirectories=[/data/app-lib/com.mukagames.savetheprincess-1, /vendor/lib, /system/lib]]

so it is likely MediaPlayer14 has been stripped out.

So, to fix it:

open your proguard-project.txt file (it is located in PROJECT_PATH/Build/Android)
add this lines:

-keep class * extends android.media.MediaPlayer {
   public *;

Rebuild the project and it should work.

I have fixed my answer. Answerhub removed two key ‘*’. Try again :slight_smile:

This sounds promising, but it didn’t work yet for me.

When I just add this line I get the error below when packaging for distribution. The same errors also comes up when I add the same in the “Intermediate” directory. Also adding a “*” before the “;” doesn’t fix it. Did u add something else? This error comes up in a blueprint only project.

I also started working with the Github version (UE 7). But there packaging takes a really long time, unless I uncheck FullRebuild. So it take some more time to figure things out. Also for compiling the headers in packaging it seems to be using clang++.exe. But I didn’t install clang nor set it to true as described here:

[Packaging Error]

MainFrameActions: Packaging (Android (ETC1)): C:\NVPACK\android-sdk-windows\tools\ant\build.xml:875: Expecting opening ‘{’ at ‘android.media.MediaPlayer’ in line 16 of file ‘E:\Gamedesign\UE Files\Projects\TakoPako2 4.7\Intermediate\Android\APK\proguard-project.txt’,
MainFrameActions: Packaging (Android (ETC1)): included from line 2 of embedded configuration
MainFrameActions: Packaging (Android (ETC1)): Total time: 9 seconds
MainFrameActions: Packaging (Android (ETC1)): BuildCommand.Execute: ERROR: BUILD FAILED