x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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:

https://forums.unrealengine.com/showthread.php?54610-Unreal-Engine-4-7-Preview/page18

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:

https://play.google.com/store/apps/details?id=com.spaceharry.TakoTako

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

Product Version: Not Selected
Tags:
logcat47crash.txt (16.7 kB)
more ▼

asked Feb 24 '15 at 08:52 PM in Bug Reports

avatar image

spaceharry
402 22 30 139

avatar image wittlief ♦♦ STAFF Feb 25 '15 at 06:31 PM

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!

avatar image spaceharry Feb 26 '15 at 01:27 AM
  • I tried with Etc1, Etc2, All and ATC. All crash on startup.

  • Its directly on Galaxy S4.

  • I installed the latest eclipse from https://eclipse.org/downloads/ and it still crashes.

[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

https://forums.unrealengine.com/showthread.php?60014-4-7-0-Android-Leaderboards-and-Achievements-no-longer-working

https://answers.unrealengine.com/questions/168599/ue-47-not-connecting-to-google-play-services.html

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?

avatar image Dredok Mar 07 '15 at 12:56 AM

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-.

avatar image Dredok Mar 07 '15 at 09:58 AM

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) ? backtrace

crashlog.txt (2.6 kB)
avatar image Dredok Mar 07 '15 at 12:06 PM

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)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

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.

more ▼

answered Mar 07 '15 at 01:08 PM

avatar image

Dredok
266 17 19 42

avatar image spaceharry Mar 08 '15 at 09:32 PM

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:

https://forums.unrealengine.com/showthread.php?54770-Using-Clang-to-compile-on-Windows

[Packaging Error]

BUILD FAILED 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

avatar image Dredok Mar 08 '15 at 09:43 PM

I have fixed my answer. Answerhub removed two key '*'. Try again :-)

avatar image spaceharry Mar 09 '15 at 01:42 AM

That's it! Worked for me also in distrubution mode. Mille Grazie!!!

avatar image piXelicidio Mar 09 '15 at 12:43 AM

@aussieburger, Your solution worked for me. Thank you :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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 :D

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

  • 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 ;) )

  • 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! :)

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

more ▼

answered Feb 26 '15 at 08:34 AM

avatar image

aussieburger
1.5k 43 176 75

avatar image spaceharry Feb 26 '15 at 02:22 PM

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.

avatar image aussieburger Feb 26 '15 at 03:13 PM

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 (http://www.adventuresofanentrepreneur.net/creating-a-mobile-appsgames-company/how-to-unpack-pack-an-apk-file), 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?

avatar image joshbadams STAFF Feb 26 '15 at 08:55 PM

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.

Josh

avatar image spaceharry Feb 27 '15 at 09:43 AM

@Josh

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:

https://answers.unrealengine.com/questions/168094/cooking-from-command-line-android.html

Edit: So yeah some guidance would be awesome :)

@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.

avatar image spaceharry Feb 28 '15 at 12:57 AM

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.

avatar image joshbadams STAFF Mar 02 '15 at 01:20 PM

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.

Josh

avatar image spaceharry Mar 02 '15 at 02:11 PM

Thank you.

avatar image Ravlek STAFF Mar 02 '15 at 04:43 PM

spaceharry,

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:

BuildCookRun

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

-clientconfig=Shipping

to

-clientconfig=Development

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.

-Pete

avatar image spaceharry Mar 03 '15 at 01:36 AM

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

commandline.txt (18.6 kB)
avatar image piXelicidio Mar 09 '15 at 12:57 AM

@aussieburger, Your solution worked for me. Thank you :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

more ▼

answered Mar 06 '15 at 05:47 AM

avatar image

Nefusadi
181 5 11 19

avatar image spaceharry Mar 08 '15 at 09:39 PM

Thanks, I guess that the solution of last resort. I will try this after having investigated some more. Also I am still waiting on a reply for the commandline build above.

By saying shipping build, did you mean shipping distribution build?

Did u first convert the old project to 4.7 and then copy the files or did u copy the files straight from 4.5 or 4.6 into the newly created project?

avatar image Nefusadi Mar 09 '15 at 12:00 AM

Yes, it was the shipping distribution build. I had converted the project for 4.7 back during the preview build, so it was the 4.7 converted version that I copied the files from.

avatar image spaceharry Mar 09 '15 at 01:43 AM

Thx for your help as well! the answer from dredok fixed it in my case.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question