Android app immediately closing down in shipping distribution mode

Hi there, I finally managed to package my APK successfully without any Gradle errors (what a nightmare).

If I package under ‘development’ mode or ‘shipping’ but with ‘distribution’ unticked, the app works perfectly fine. It installs, it runs and the AR and everything else works great.

If I package for google play under ‘shipping, distribution’ mode then the app will install but not launch.

What happens is the app opens for a brief second and then immediately closes itself down.

This is signed properly (hopefully) using the cmd to launch keystore and I provide the keystore in /project/build/android/

What else could the issue be? Can anyone help me please?

  • I’m using UE 4.27.2

  • Location of SDK: /AppData/Local/Android/Sdk

  • Location of NDK: /AppData/Local/Android/Sdk/ndk/21.1.6352462

  • Location of JAVA: C:/Program Files/Android/Android Studio/jre

  • SDK API Level: android-32

  • NDK API Level: android-21

  • Minimum SDK Version: 28

  • Target SDK Version: 28

After a week of trial and error, reading every source I can find and using three different version of unreal engine this was the only combination that will package without giving me Gradle errors.

Hi there, did you ever resolve this? We’re now having the same issue. Any help would be greatly appreciated!

Hi there, when I get home I will check my settings and share with you. I no longer have the issue. Are you still facing this problem?

When anything goes wrong on an Android project, my first step is always to get the LogCat output from the event.
I e, start LogCat, start the game, wait for crash, stop LogCat, and then sift through the output to look for the error.

This is good practice but UE compatibility with android seems so random. For example I saved all my settings from another computer I had. I copied everything so I could transfer my project to my new computer. Same software, versions, the lot. Same setup process and yet it didn’t build without errors.

So I had spend another couple of days testing many SDK versions and hoping they all line up and let me build, and then actually run after packaging for shipping mode.

My laptop has different settings compared to my PC and yet they both build and run fine, but if I change anything it wont build anymore. I have no idea why it’s such a broken and sensitive mess but there it is.