# Problem on exporting .apk for android

**URL:** <https://forums.unrealengine.com/t/problem-on-exporting-apk-for-android/1616143>\
**Category:** XR Development\
**Tags:** Android-Packaging, exporting, oculus-vr, unreal-engine, bug-report, question\
**Created:** [January 15, 2024, 7:44am UTC](https://forums.unrealengine.com/t/problem-on-exporting-apk-for-android/1616143 "2024-01-15T07:44:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![DeborahSiv](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DeborahSiv](https://forums.unrealengine.com/u/DeborahSiv)\
**Post date:** [January 15, 2024, 7:44am UTC](https://forums.unrealengine.com/t/problem-on-exporting-apk-for-android/1616143/1 "2024-01-15T07:44:24Z")

</div>

Hi everyone.  
For the company where I work, we create VR training environments and recently decided to use Unreal. I am experiencing a problem when exporting to .apk! I have followed the unreal guide for installing android studio, ndk and jdk and have followed many tutorials to understand the various settings of unreal.

I will leave you with some specifications:

unreal : 5.3.1  
android studio : 2022.2.1  
sdk : downloaded with android studio  
ndk : r25b  
java : jre 1.8  
The error I get when exporting reports at the end:

UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=6 (6)  
UATHelper: Packaging (Android (ASTC)): BUILD FAILED  
PackagingResults: Error: Unknown Error

If it is helpful I can send you a txt with the entire output log!

I’ve tried various ways to solve this, but I haven’t come up with anything!  
Thank you, I hope you can help me!

---

<div class="post-metadata">

**Author:** ![Bojann](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bojann/32/906560_2.png) [@Bojann](https://forums.unrealengine.com/u/Bojann)\
**Post date:** [January 15, 2024, 8:04am UTC](https://forums.unrealengine.com/t/problem-on-exporting-apk-for-android/1616143/2 "2024-01-15T08:04:12Z")

</div>

How much space do you have on target dir (where you want to export the APK)? Make sure to try on another driver where you have a lots of space.

Check how much memory you have allowed for Gradle. Maybe you should adjust that too.

Entire output log would be much better. You can attach it as TXT file.

---

<div class="post-metadata">

**Author:** ![Logos\_Atum](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/logos_atum/32/934054_2.png) [@Logos\_Atum](https://forums.unrealengine.com/u/Logos_Atum)\
**Post date:** [January 15, 2024, 12:20pm UTC](https://forums.unrealengine.com/t/problem-on-exporting-apk-for-android/1616143/3 "2024-01-15T12:20:07Z")

</div>

You would want to check the filenames and directories for invalid characters. I know that this can prevent sucessful packaging.  
Can you provide the complete output log? I can have a look.

---

<div class="post-metadata">

**Author:** ![DeborahSiv](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DeborahSiv](https://forums.unrealengine.com/u/DeborahSiv)\
**Post date:** [January 18, 2024, 12:40pm UTC](https://forums.unrealengine.com/t/problem-on-exporting-apk-for-android/1616143/4 "2024-01-18T12:40:39Z")

</div>

Thanks @Logos_Atum & @Bojann for the help!  
I will try to follow the tips you gave me and let you know! In the meantime, I attach the txt with the complete output log  
[Errore Unreal.txt](https://forums.unrealengine.com/uploads/short-url/ypKZT7hR2hHhEMpLDn4aLOqXOv6.txt) (5.1 KB)

---

<div class="post-metadata">

**Author:** ![Logos\_Atum](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/logos_atum/32/934054_2.png) [@Logos\_Atum](https://forums.unrealengine.com/u/Logos_Atum)\
**Post date:** [January 19, 2024, 12:53pm UTC](https://forums.unrealengine.com/t/problem-on-exporting-apk-for-android/1616143/5 "2024-01-19T12:53:50Z")

</div>

Hey,

[this](https://www.dragonflydb.io/error-solutions/unreal-engine-could-not-find-definition-for-module) might be it.

In my case I deleted the folders specified. I read this in another post I did not manage to find, but it was on the forums.

---

<div class="post-metadata">

**Author:** ![DeborahSiv](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DeborahSiv](https://forums.unrealengine.com/u/DeborahSiv)\
**Post date:** [January 22, 2024, 4:15pm UTC](https://forums.unrealengine.com/t/problem-on-exporting-apk-for-android/1616143/6 "2024-01-22T16:15:12Z")

</div>

Hi guys! Thanks for the help!  
I tried to follow your advice:

- I checked the space in the target dir and it is enough.
- I checked the memory allocation for gradle and set it to DEFAULT\_JVM\_OPTS=-Xmx1024M.
- I found a page on this unreal forum that recommends increasing the page file size from the computer properties. I set the max to 5000m.
- I checked the file and directory names and everything is ok.

I tried doing a further export with ue5.1.1 and it returns a different output log, I attach the txt.  
[Error\_Unreal\_5-1.txt](https://forums.unrealengine.com/uploads/short-url/pq9a48730ccfvcLPqYrZtTvZwfZ.txt) (125.1 KB)

Hopefully to solve it, thanks!

---

<div class="post-metadata">

**Author:** ![Logos\_Atum](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/logos_atum/32/934054_2.png) [@Logos\_Atum](https://forums.unrealengine.com/u/Logos_Atum)\
**Post date:** [January 24, 2024, 3:35pm UTC](https://forums.unrealengine.com/t/problem-on-exporting-apk-for-android/1616143/7 "2024-01-24T15:35:25Z")

</div>

Ah,

“Could not find definition for module ‘GoogleGameSDK’”

Eventually you just have to verify the locations of the necessary prerequisites, that looks a lot like something you can installl via Android Studio. That might be it.

---

<div class="post-metadata">

**Author:** ![DeborahSiv](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DeborahSiv](https://forums.unrealengine.com/u/DeborahSiv)\
**Post date:** [January 29, 2024, 11:57am UTC](https://forums.unrealengine.com/t/problem-on-exporting-apk-for-android/1616143/8 "2024-01-29T11:57:14Z")

</div>

Good morning! Thank you all for your availability and your help! Unfortunately a lot of advice, even online advice on other sites, is too technical for me, who just started with Unreal.  
In the past I had managed to export a VR demo with UE 5.1, so I drastically decided to delete everything: Android Studio, Visual Studio, Unreal and all the folders created in the pc. I re-installed everything, following the documentation for the UE 5.1 version, and by doing so I was able to export a working .apk to Meta Quest without any problems!

Now I have to figure out if I can convert the project from UE 5.3 to UE 5.1.

Thank you very much for your helpfulness

Deborah

---

<div class="post-metadata">

**Author:** ![Logos\_Atum](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/logos_atum/32/934054_2.png) [@Logos\_Atum](https://forums.unrealengine.com/u/Logos_Atum)\
**Post date:** [January 30, 2024, 1:23pm UTC](https://forums.unrealengine.com/t/problem-on-exporting-apk-for-android/1616143/9 "2024-01-30T13:23:54Z")

</div>

Gladly… oh that will be “nice”. Migrating might work… miiiight.

Godspeed

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [February 29, 2024, 1:24pm UTC](https://forums.unrealengine.com/t/problem-on-exporting-apk-for-android/1616143/10 "2024-02-29T13:24:26Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
