Hi All,
I’ve spent all day rattling through the answerhub and internet trying to find a solution. I even went so far as to reset the Nexus 7 (Android) for which I’m trying to build my relatively simple game.
I did manage, using one of the many Android options available at building to get the game to appear on the Android device. However, all that did was then show a black screen for a second before dropping back immediately to the tablet’s main screen. I noted that the program was still running in the background, but any attempt to reach it would result in being thrown straight back to the home screen.
I successfully built the project in Windows - albeit with some issues to do with graphical scaling that I’ll start struggling with once I have this sorted.
I carefully followed all of the instructions on how to get set up to build and install Android to a device.
The key lines in the Log seem to play along like this:
LogPlayLevel:Display: InternalUtils.SafeFileExists: SafeFileExists C:\Windows\system32\cmd.exe=True
LogPlayLevel:Display: CommandUtils.Run: Run: C:\Windows\system32\cmd.exe /c C:\NVPACK\android-sdk-windows/platform-tools/adb.exe -s 09d54207 uninstall com.epicgames.BlackOrWhite
LogPlayLevel:Display: cmd: Failure
LogPlayLevel:Display: cmd:
LogPlayLevel:Display: CommandUtils.Run: Run: Took 0.9198765s to run cmd.exe
LogPlayLevel:Display: InternalUtils.SafeFileExists: SafeFileExists C:\Windows\system32\cmd.exe=True
LogPlayLevel:Display: CommandUtils.Run: Run: C:\Windows\system32\cmd.exe /c C:\NVPACK\android-sdk-windows/platform-tools/adb.exe -s 09d54207 install "J:\Unreal Projects\BlackOrWhite\Binaries\Android\BlackOrWhite-armv7.apk"
LogPlayLevel:Display: cmd: rm failed for /data/local/tmp/BlackOrWhite-armv7.apk, No such file or directory
LogPlayLevel:Display: cmd:
LogPlayLevel:Display: cmd: protocol failure
LogPlayLevel:Display: cmd: - waiting for device -
LogPlayLevel:Display: CommandUtils.Run: Run: Took 4.4197861s to run cmd.exe
LogPlayLevel:Display: BuildCommand.Execute: ERROR: BUILD FAILED
LogPlayLevel:Display: Program.Main: ERROR: AutomationTool terminated with exception:
LogPlayLevel:Display: Program.Main: ERROR: Exception in AutomationTool: Command failed (Result:1): C:\Windows\system32\cmd.exe /c C:\NVPACK\android-sdk-windows/platform-tools/adb.exe -s 09d54207 install "J:\Unreal Projects\BlackOrWhite\Binaries\Android\BlackOrWhite-armv7.apk". See logfile for details: 'cmd.1.txt'
LogPlayLevel:Display: Stacktrace: at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options)
LogPlayLevel:Display: at AndroidPlatform.Deploy(ProjectParams Params, DeploymentContext SC)
LogPlayLevel:Display: at Project.Deploy(ProjectParams Params)
LogPlayLevel:Display: at BuildCookRun.DoBuildCookRun(ProjectParams Params)
LogPlayLevel:Display: at BuildCommand.Execute()
LogPlayLevel:Display: at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
LogPlayLevel:Display: at AutomationTool.Automation.Process(String[] CommandLine)
LogPlayLevel:Display: at AutomationTool.Program.MainProc(Object Param)
LogPlayLevel:Display: at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)
LogPlayLevel:Display: at AutomationTool.Program.Main()
LogPlayLevel:Display: Program.Main: ERROR: Command failed (Result:1): C:\Windows\system32\cmd.exe /c C:\NVPACK\android-sdk-windows/platform-tools/adb.exe -s 09d54207 install "J:\Unreal Projects\BlackOrWhite\Binaries\Android\BlackOrWhite-armv7.apk". See logfile for details: 'cmd.1.txt'
LogPlayLevel:Display: ProcessManager.KillAll: Trying to kill 0 spawned processes.
LogPlayLevel:Display: Program.Main: AutomationTool exiting with ExitCode=1
LogPlayLevel:Display: Domain_ProcessExit
LogPlayLevel:Display: ProcessManager.KillAll: Trying to kill 0 spawned processes.
LogPlayLevel:Display: copying UAT log files...
LogPlayLevel:Display: RunUAT.bat ERROR: AutomationTool was unable to run successfully.
LogPlayLevel:Display: BUILD FAILED
I did try and copy the apk file across to the device and running it manually there, with no success. I’m frustrated as I’ve followed every instruction I can see and still cannot see where I’m going wrong. I thought perhaps it might be something to do with the fact the Nexus 7 fakes having an SDcard, but then shrugged that off as an external source would still BELIEVE there was an SD card installed.
I’m going to go grab a Galaxy S4 I have upstairs and try the same thing again - however, if I don’t post anything about results in the next 15 minutes it means that failed with the same reason.
Please can anyone help?
Howdy ,
Thank you for reporting this issue. I just need a bit more information from you before I look into this issue. What version of UE4 are you currently using when attempting to build for your Nexus? Have you installed the SDK build file for your phone? Have you been able to package before this build previously in another version of UE4? Any additional information would be greatly appreciated.
Thanks and have a great day!
Hi - Thank you for responding. Unfortunately, being new to the engine (only a few months), I made the rookie mistake of updating the project as I go along. I’m not sure if this was a good idea or not. The game was originally designed in 4.3.1 and now I’ve upgraded to 4.4.0. Lesson learned on using the copy feature!
I did install the SDK for the Nexus but it occurs to me I may not have installed the Galaxy S4 - being both Android I figured they’d be the same thing, but probably not. I’ll do that now and update you.
OK. I installed the entire SDK. That seemed to cause all sorts of problems so I rebuilt my Nexus 7 back to factory 4.4.4 and then reinstalled the drivers as per the instructions on the Unreal web site, but now I cannot get the Nexus 7 to identify within Unreal.
I’ve since tried a Windows desktop build. It seems to have an issue whereby I can play a round through, but upon losing and returning to the main menu, any attempt to start the game again results in the following error:
(Note - this call might need to be split into two separate issues at this rate:
OK, I rebuilt the Nexus 7 with a fresh stock ROM so it’s fully as if it was new and the latest error has gone.
I removed and reinstalled the drivers/software on the PC. I had to install a side-along copy of the driver software and reboot a few times but at least I’m up to a point of it working.
Now I managed to get the game to run - albeit with random crashes - on one device. WIll update further for those who may also face this problem.
OK. I fixed a couple of small errors and cleaned up the setup - got rid of unneeded textures, etc…
Since then I’ve been able to package the game and I have three files, the apk, the batch, and the obb.
I attempted to copy the apk and the obb to a Nexus 7 and run the apk to install. It appeared to work but upon starting the application immediately went black-screen-to-desktop.
I then removed all trace of the program from the device, and then disabled USB storage mode and ran the batch file instead. It flashed by so I didn’t originally get the details, but the game appeared on the device and started. The main menu works in itself, but any attempt to start the game via pressing Start in the main menu of the game then causes a crash to desktop. I cleaned it all off and ran the batch in a manual cmd window.
The batch file executed as the image below…
The main menu operates properly, but the Start button in-game causes an immediate drop to desktop.
Please note that I successfully managed, multiple times, to launch the game on the device and play it through when using the Launch option in the UE4 editor.
Thank you for providing the images and all of the information. In the sixth section of this photo, I see the line uninstall com.epicgames.BlackorWhite Failure. If you ever see a failure in that line, I would highly recommend close out that window, thus cancelling the deployment. You want to see successful in both section while attempting to deploy.
Let me know if this helps any
Hi,
Thank you for the reply and continued support - my entire project hinges on getting this sorted…so please don’t lose faith in me now…I’m learning very fast.
I had assumed that those lines were in the batch file to ensure removal of any pre-installed versions of the game software. Since I had been removing them manually I didn’t think twice about it.
These scripts were build by the build process in UE4…so there’s got to be something wrong with the building process in UE4 - perhaps a Nexus 7 incompatibility…except it worked fine when I ran the game from the Launch option in the editor.
If you note, the other lines of the batch file, the ones dealing with installation, see to work OK.
Can it be confirmed where an obb file needs to be in relation to to .apk file for Unreal 4 projects.
Is there perhaps an issue with UE4 and something to do with changing maps?
Howdy ,
Sorry for the late response. I know before that you mentioned that you has a Galaxy S4. Have you retried to deploy to that device?
There is an issue currently where deploying to a tablet is causing the application to not open. I am currently unsure as to when a fix may come out for that issue, but it is being worked on for a future release.
Hey ,
They was a user with a similar issue where their RunUAT.bat was causing an error. Here is a link to the issue: RunUAT.bat ERROR: AutomationTool was unable to run successfully - Platform & Builds - Epic Developer Community Forums
Let me know if this helps with your issue. Thanks!
Hi,
I’m using the binaries to run everything. I did not build the program from the source code from GitHub so the issue remains.
I’ve attached latest log file.
What the whole problem seems to be is a fault with the open level command. Everything else works perfectly (so far). The weird bit is that it works if I force the run via the editor on the Nexus 7, but not at all on the Galaxy S4 I have.link text
Hey ,
What android build are you currently using when trying to deploy to the S4? (Ex:ATC, ETC1,…) It is very awkward that it would show for the Nexus 7 but not the S4. Have you tried this issue on the new 4.4.1 release yet?
I’m using (ALL) as the build. I had the same problem with ETC2.
I must emphasise that the same problem occurs with both devices if I package the game and then attempt to install it from the batch file.
The game does work if I use the Launch option at the top of the UE4 editor.
I’ve been reading up and a number of people seem to have crashing problems on Android when using the Open Level command.
About to test the 4.4.1 release…
I tried running the build for ETC2 and ALL again after updating to the 4.4.1 release. Still the same issue.
Just for kicks I tried running it via the Launch (ALL) option in the UE4 editor and now that doesn’t work either.
Things are getting worse…
Is the Launch feature throwing an error to do with the automation tool failing? We do have a bug entered in for that currently.
I have looked through some Documentation involving launching to devices and switching between levels is unsupported. Here is a link to that Documentation: Launching to Devices | Unreal Engine Documentation
But shouldn’t packaging and then installing via the supplied batch file be supported? At the moment that isn’t working.
Being able to install the batch file is supported. Are you fully waiting until the Command pop up closes itself?
Also have you tried ETC1 to package for your S4?
I will try packaging to the S4 using ETC1 and see how it works.
As regards to the command line, I open my own administrative command prompt and run it from there so I can see the results. The results are in the image above. I’ll post another one from the S4/ETC1 attempt.
Thank you.
In the mean time is there any documentation as to how I can move between main menus, score pages, leaderboards, and the main game without using any levelling?