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"

Game Fails on APK Launch, But Not Editor Launch

I've encountered such a strange problem. I went to package my game for android and even pushed it to release on google play. The game testing that takes place for stability shows videos of my game running, but when you install it and try to run it, you just get a splash-screen and then a gradient background, and it just hangs there. It launches when I plug in my phone and launch from the editor. But if I package and copy the .apk to my phone to install it, I just get the black and white gradient screen. Does anyone know what might be causing this? Thanks in advance.

Log from standalone launch

Log from editor build and launch

Thank you so much to anyone willing to make sense of these logs. I am very confused about why my game is failing. It is crucial I get this figured out.

Product Version: UE 4.21
Tags:
phonelog.txt (44.8 kB)
stackergame.log (108.6 kB)
more ▼

asked Jan 05 '19 at 03:04 AM in Packaging & Deployment

avatar image

geekTechnique
83 2 6 12

avatar image geekTechnique Jan 05 '19 at 05:39 PM

I will grant you the answer however you want to write it by the way. If you write something down there, I'll accept it.

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

First things to do are investigating logs. Please share these logs:

  1. Package the game in development mode, launch and find Logs folder.

  2. Launch monitor.bat in NVPACK, select your device, clear logs and immediately launch the APK. And when you see gradient screen, immediately copy logs with Ctrl+A & Ctrl+C.

more ▼

answered Jan 05 '19 at 03:11 AM

avatar image

SalihBalkan
419 14 26 54

avatar image geekTechnique Jan 05 '19 at 02:20 PM

I will reply with an edited reply soon. I need a minute to figure out how to use the andoid device monitor. Thank you so much for helping me.

avatar image geekTechnique Jan 05 '19 at 03:46 PM

Logs have been added to the main question.

avatar image SalihBalkan Jan 05 '19 at 04:04 PM

Body sensor? Your app says it needs this permission:

android.permission.BODY_SENSORS

Try adding this permission and let's see what will happen.

Also I didn't understand what second log is. I need logs from development APK. It must be created in your games save directory. You need to find your apps save directory first, then you can easily find Logs folder there.

avatar image SalihBalkan Jan 05 '19 at 04:11 PM

Sorry android.permission.BODY_SENSORS, not android.permission.BODY_SENSOR. I edited my comment.

avatar image geekTechnique Jan 05 '19 at 04:54 PM

How exactly do I add a permission? Do I need to modify the AndroidManifest.xml file to do that, or is there an option in the editor?

Since posting this question, I've a done a few things that may help troubleshooting. I made a brand new project with no starter content, just the little block that spawns by default, and the base objects. So I tried to package it, and it failed and told me gradle failed in the log. So I told the new app to use ant instead of gradle and the packaging completed.

The new project won't launch to my phone from the editor, but the the packaged apk will launch, however, to just a black background with only the touch controller-sticks on top. I am inclined to think it is a problem with codeworks because of this. We are supposed to be using r16 still, aren't we? That's what says in the ue4 documentation.

I will update my original post, but I'm unsure what I did wrong about the log. Before updating my log, I want to ask a specific question --> I got it from the C:...\game\saved\logs folder. I first deleted it, then did the build on the apk, generating a new log file. Should I launch the game to my phone from the editor, where it actually works, and give you logs for that? I just want to certain I give you what you need to help me.

avatar image SalihBalkan Jan 05 '19 at 05:11 PM
  1. Just search 'permission' in project settings

  2. Moving partial project files always cause problems, so normal. I don't think it is a problem of nvpack version. Sdk version is what matters.

  3. Saved/Logs folder also exists in your phone storage when you launch with development mode APK. Try these: https://android.stackexchange.com/questions/47924/where-android-apps-store-data

avatar image geekTechnique Jan 05 '19 at 05:37 PM

YOU ARE THE BEST!!!!!!! Thank you thank you thank you so much! This was driving me crazy. All I had to do was add that permission. Did I say thank you? Because I really appreciate it!

avatar image SalihBalkan Jan 05 '19 at 05:42 PM

Good, I am happy to see you resolved your issue :) But I wonder why your app does need sensor permission? Looks like you were not aware of a sensor feature in your app.

Also to resolve this kind of Android issues, first thing I do is searching keyword: 'permission' in monitor.bat logs according to my past experiences. So it was very easy for me :)

avatar image SalihBalkan Jan 05 '19 at 05:19 PM

Oh you launched in Android device from editor? Sorry these logs are enough. I will check them.

avatar image SalihBalkan Jan 05 '19 at 05:35 PM

Please investigate this errors:

LogPlayerController: Error: InputMode:UIOnly - Attempting to focus Non-Focusable widget SObjectWidget [Widget.cpp(710)]!

Is LogPlayerController your class? Check what is problem of it from Widget:719. I am mobile now so cannot do many thing. Ç

avatar image geekTechnique Jan 05 '19 at 06:05 PM

I don't think so. I wouldn't know exactly where to find that. I mean, I use "get player controller" all the time. But I'm not sure what logPlayerController is. Thank you for continuing to help me figure out the cause of this.

avatar image geekTechnique Jan 06 '19 at 09:00 PM

Hey again Balkan. I noticed another anomaly. When I change back to shipping, we have the same issues as before. It's as if it needs this permission to access phone internals to render my main subject. It's quite odd. I've gone so far as to reinstall windows, ue4, visual studio, and codeworks, and I have the exact same problems, even with a brand new project, gradle fails. I would appreciate it if you could offer some insight, as you seem very knowledgeable, and many questions go unanswered here.

I can work around it for now, but not being able to to put my app in "shipping" adds a massive 40% to my file-size. At some point, I will need to be able to package an .apk properly, and I'm wondering what else can I try???

By the way, when I comment here, It removes your answer as the accepted answer, don't worry, I'll be sure you retain ownership of the answer; I just didn't know how else to comment on this subject. Thanks so much for your time and help.

avatar image SalihBalkan Jan 07 '19 at 07:05 AM

Did you take same permission error in monitor.bat logs? If so, probably BODY_SENSORS permission should be given at runtime. Android sees BODY_SENSORS permission in dangerous category:

https://developer.android.com/reference/android/Manifest.permission

Use "Request Android Permissions" node in blueprint if this is the problem and do the jobs that you do after(if) user grants BODY_SENSORS access.

avatar image geekTechnique Jan 10 '19 at 12:12 AM

I did take the same permissions. Thank you so much for your continued help. I haven't had the chance to use this advice yet, but thank you nonetheless.

avatar image geekTechnique Jan 21 '19 at 12:26 AM

Hey Salih, I know it's been 2 weeks, but I've been swamped. Are you still willing/able to help me with my specific issue if I update my logs? Many of my testers are weary of allowing permissions like that. Not to mention I can't get my shipping build working.

If so, I'll update this question or make a new one, but let me know, and I'll thumb up every post you make.

avatar image SalihBalkan Jan 21 '19 at 08:03 AM

"and I'll thumb up every post you make" that is really not necessary :) Just create a new question and tag me.

(comments are locked)
10|2000 characters needed characters left

In your project settings do you have the correct game default map?

alt text

more ▼

answered Jan 05 '19 at 03:51 AM

avatar image

MrGoatsy
604 34 26 41

avatar image geekTechnique Jan 05 '19 at 12:15 PM

Thanks for responding to my question, but I do have a default map selected. Any other ideas would be very appreciated.

(comments are locked)
10|2000 characters needed characters left
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