# Unable to Export APK from Unity - Build Prompts for Folder Instead (Magic Leap 2 Developer Pro)

**URL:** <https://forum.magicleap.cloud/t/unable-to-export-apk-from-unity-build-prompts-for-folder-instead-magic-leap-2-developer-pro/5845>\
**Category:** Unity Development\
**Tags:** development, unity, openxr\
**Created:** [June 6, 2025, 5:38pm UTC](https://forum.magicleap.cloud/t/unable-to-export-apk-from-unity-build-prompts-for-folder-instead-magic-leap-2-developer-pro/5845 "2025-06-06T17:38:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JunsuSong](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@JunsuSong](https://forum.magicleap.cloud/u/JunsuSong)\
**Post date:** [June 6, 2025, 5:38pm UTC](https://forum.magicleap.cloud/t/unable-to-export-apk-from-unity-build-prompts-for-folder-instead-magic-leap-2-developer-pro/5845/1 "2025-06-06T17:38:22Z")

</div>

Give us as much detail as possible regarding the issue you’re experiencing:

**Unity Editor version** : 6000.1.5f, Unity 2022.3  
**ML2 OS version** : v1.12.0  
**Unity SDK version** : 2.6.0  
**Host OS** : Windows, MacOS

My name is Junsu Song, a graduate student at POSTECH (Pohang University of Science and Technology) in South Korea. I am currently working with the Magic Leap 2 Developer Pro device and am attempting to deploy content developed in Unity onto the headset.

I got to know more about the Magic Leap 2 device through your documentation and guides, which were incredibly helpful.  
I was able to successfully set up my Unity environment using the Magic Leap Setup Tool available on the Unity Asset Store.

However, I am currently encountering an issue I cannot resolve.

After importing and applying the Magic Leap Setup Tool in Unity, when I try to Build or Build and Run for Android, Unity does not export an APK file. Instead, it prompts me to select a folder, as shown in the attached screenshots.

I did not enable the “Export Project” option, so I don’t understand why it’s prompting me to select a folder instead of exporting an APK.  
This time, I tried setting everything up based on the instructions in the following YouTube video:

[![](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/1/1e7eb02f9777491301b713677b41c92e1e5c49bc.jpeg "Magic Leap 2 | Building your First Unity OpenXR App") ](https://www.youtube.com/watch?v=QnYDCRlnf0c)

However, the same issue still occurred.

I tested this on both Windows and macOS, using Unity 2022.3 LTS and Unity 6, and the result is the same — the build process always asks for a folder instead of generating an APK.

Could you please help me understand why this is happening?

In addition, I have a few more questions:

1. In many YouTube videos and guides, I see that there is a Magic Leap tab under Preferences \> External Tools.  
However, as shown in my screenshot, I do not see that tab in my setup. I’d like to understand why it’s missing.

2. In Magic Leap Hub 3, under the Developer tab, I have set the custom ADB path as follows:  
/Applications/Unity/Hub/Editor/6000.1.5f1/PlaybackEngines/AndroidPlayer/SDK/platform-tools/adb  
Is this the correct setup, or is there another recommended configuration?

I’m very excited about building content using Magic Leap 2 and sharing XR experiences with others. I truly appreciate the tools and ecosystem you provide, and I would be grateful for your help in resolving this issue.

 ![Window_Unity2022](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/0/01b0ae6213c4e2518ab9393583d218d9f74dae70.png)  
 ![MacOS_Unity6](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/c/c91de1c9e91de2fbeacf9ae7c6b151d375367fd2.jpeg)  
 ![Hub3_Set](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/b/b216ab80ce5889b226eea1f4072ce6c9be5e5b4f.png)  
 ![Preferences](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/e/e7d9108732e7d5df23850bc642c6c62932cfa6d7.png)

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [June 6, 2025, 5:41pm UTC](https://forum.magicleap.cloud/t/unable-to-export-apk-from-unity-build-prompts-for-folder-instead-magic-leap-2-developer-pro/5845/2 "2025-06-06T17:41:32Z")

</div>

Hey @JunsuSong the issue you are facing is definitely a tricky one to track down in the Unity editor. The issue is a Player setting that exports APKs based on their architecture. It does so by putting all of them into a folder. The option continues to perform the same way, even when a single architecture is selected.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/6/68bbb740fd126c7f0ee7276893105801256bc2c4.png)

Additionally, if you have issues with your application rendering black, make sure you have the standard `Activity` selected instead of the `GameActivity` option in the Player settings.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/1/132350e9dda7df532ae0293cea3362fa93b06a5f.png)

---

<div class="post-metadata">

**Author:** ![JunsuSong](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@JunsuSong](https://forum.magicleap.cloud/u/JunsuSong)\
**Post date:** [June 7, 2025, 10:42am UTC](https://forum.magicleap.cloud/t/unable-to-export-apk-from-unity-build-prompts-for-folder-instead-magic-leap-2-developer-pro/5845/3 "2025-06-07T10:42:25Z")

</div>

![Unity6_NoAPK](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/5/580c07d1446bb795488b5d8814a0fdfa958eb848.jpeg)

Thank you very much for your previous response — I really appreciate your help.

On **macOS** using **Unity 2022.3.56f1 LTS** , I was able to successfully export an APK file after disabling the **Split APKs by target architecture** option as shown in the first screenshot you provided.  
I then tested Build and Run for Magic Leap 2, and I was happy to see that it worked properly.

However, when I tried using **Unity 6000.1.5f1** , I encountered a new issue.  
As shown in the attached screenshot, the build fails with the following error:

> **Gradle Error: Resource Not Found**  
> Resource ‘style/BaseUnityGameActivityTheme’ not found in AndroidManifest.xml:88

Because of this error, I’m unable to export the APK.

Would you be able to help me understand what is causing this issue?

Thank you again for your support — I really appreciate it.

---

<div class="post-metadata">

**Author:** ![localjoost](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/localjoost/32/1829_2.png) [@localjoost](https://forum.magicleap.cloud/u/localjoost)\
**Post date:** [June 10, 2025, 2:13pm UTC](https://forum.magicleap.cloud/t/unable-to-export-apk-from-unity-build-prompts-for-folder-instead-magic-leap-2-developer-pro/5845/4 "2025-06-10T14:13:18Z")

</div>

This is a simple fix  
In Assets/Plugins/Android, find the file AndroidManifest.xml  
Open it in a text editor

It will have a line that starts with

**\<activity android:name=“com.unity3d.player.UnityPlayerGameActivity”**

And it will have an attribute with value “style/BaseUnityGameActivityTheme”. Remove attribute and value, so you only have

\<activity android:name=“com.unity3d.player.UnityPlayerGameActivity”\>

And then it will work
