4.18.0 android packaging cook failed / engine crash on launch

Hey. I had problems too launching android. What made it work for me was i made project for phone/tablet and 3d scalable/ 2d quality. Also the other thing what needed to be done is set up Environment Variables. Where you go to advanced settings and go to Environment Variables. Just followed this one unreal engine tutorial.

And in the end what i did was unticked Enable Gradle instrad of Ant. Then it launched.

Maybe something might help. That is how i made it work for me after struggling whole day.

Hi,

at the moment i am trying to get into creating apps for android using ue4.
I am encountering 2 in my eyes strange issues that i was not able to come across, i hope someone here can give me a hint on what i might try.

installed software:
after installing ue 4.18.0, i installed […]\UE_4.18\Engine\Extras\AndroidWorks\Win64\CodeWorksforAndroid-1R6u1-windows.exe

project setup:

  • I tried creating a few new Projects using different blueprint templates (2d side scroller, twin stick shooter, puzzle)
  • hardware target: mobile/tablet
  • quality: tried both options
  • starter content: tried both options

problem #1

when i try to launch the game on my phone (launch target), the editor crashes (windows popup “unreal engine has stopped working”, see attached image
crash_on_launch_log_excerpt.PNG)
last line in the output log was
LogMaterial: Verifying Global Shaders for GLSL_ES2
LogMaterial: Missing cached shader map for material TutorialMaterial, compiling.
LogMaterial: Missing cached shader map for material MatineeCam_mat, compiling.

problem #2

after a direct launch did not work, i tried packaging the project, this always fails with
“PackagingResults: Error: Unknown Cook Failure”
(attached files for this:
Cook-2017.11.03-08.59.48.txt
UAT_Log.txt)
after searching the internet i found quite a few similar problems, but none of the given hints seemed to work for me.

what i tried:

  • deleting intermediate / saved folder in project
  • project settings → Android SDK most entries where empty, so i manually inserted the download folders for sdk / ndk / …
  • changed sdk api level to matchndk
  • changed ndk api level to latest

As i think those two problems might be related i put both in this question,
i hope s.o. here can give me a hint on what i might have done wrong.

Hi,
thanks for the response.
I checked the environment variables, they seem correctly set up (plus now i think that in my game settings the corresponding entries where empty cause it is meant to use the globally defined paths)

I also tried to disable gradle in the settins as you mentioned, but without any success.

With Gradle you need to have the Android Support Repository and Android Support Library

I was having problems with packaging too, but I realized that I was missing a repository. Though the editor does give out a message about this and packaging without grade should work fine at the present state. Your problem seems like something else. Still, it is worth a try…

This solved my issue with failed packaging - >

Go to - NVPACK\android-sdk-windows\tools\android.bat

Downloaded/Updated Android Support Repository and Android Support Library

If you are packaging with a C++ or nativization enabled project. Make sure you have Visual Studio Community 2017 well set up

If not try packaging a blank blueprint project and see if it successfully packages. If yes, then it is some project specific issue.