# Packaging for Android always fails

**URL:** <https://forums.unrealengine.com/t/packaging-for-android-always-fails/1219583>\
**Category:** Mobile\
**Tags:** unreal-engine, Android\
**Created:** [July 4, 2023, 9:57pm UTC](https://forums.unrealengine.com/t/packaging-for-android-always-fails/1219583 "2023-07-04T21:57:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![swrcVendetta](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@swrcVendetta](https://forums.unrealengine.com/u/swrcVendetta)\
**Post date:** [July 4, 2023, 9:57pm UTC](https://forums.unrealengine.com/t/packaging-for-android-always-fails/1219583/1 "2023-07-04T21:57:39Z")

</div>

Hey everyone,

I absolutely do not know how to successfully package/build for android. I feel like the SDK and NDK versions to choose are absolutely random but none of them seem to work for me.

What I did:

I fully removed both Java and anything related to Android Studio. I am running on a fresh UE 4.27.2 with a project that has only a few BP-assets and some CPP classes made from the blank template no starter content.  
I installed the JDK 1.8.0\_77 so I have the same jre as my Java (shown in images).  
 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/4/034360c18399a221edd3699f25b9d8689c1ee13f.png)  
I chose this one cause people used it and it seems to work for them.

I then installed Android Studio 4.0 (the one with no Beta or Alpha or whatever) from the documentation. I then Installed the NDK from documentation for 4.27 (NDK21b I think) and selected Android API 31 and selected thise SDK’s for 31 too! I even tried others, 28, 29, 32, eve 34 and none of them seem to work. My current error when building looks like the following:

 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/7/b/c7bb557daa2878f6b64f6ff9419c9c57218adf72.png)  
and ends like  
 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/a/3/8a3110a7e170266166ef887108ec1dbd1e3d9a39.png)  
I’ve watched many tutorials online and none of them do work for me. If someone can explain step by step how to properly do this I would be thankful. But at this point I kinda doubt it’ll work for me…

Also I do not know why I got these warnings…

 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/5/225262fbae5804142ea8c1eb218c499a4fe557ba.png)  
 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/3/1/6319eb5a2e1cc159100ada6b5ddbd0e977d4c640.png)  
I never ever had these in my project since I started on a blank project.

Thank you already for trying to help me!!!

---

<div class="post-metadata">

**Author:** ![swrcVendetta](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@swrcVendetta](https://forums.unrealengine.com/u/swrcVendetta)\
**Post date:** [July 4, 2023, 9:59pm UTC](https://forums.unrealengine.com/t/packaging-for-android-always-fails/1219583/2 "2023-07-04T21:59:25Z")

</div>

Here is some additional info if it helps.  
 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/9/d/f9da4757214668d147ba6a0d84fdb8cf5e38a37f.png)

 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/8/f/e8f4d4019c9f3745b5e532a1267e0148c95d8c62.png)  
 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/9/3/b933e5cb018eebe69b119799b61ebc82c1fdabd7.png)  
 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/4/f54e90c83ac6c4995a940bd71fc6bb6c25f7799a.png)  
 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/6/f/16fc250201a52056da02d49a76ae558d97e0d069.png)

I did try a lot so in case you’d recommend to use a different NDK or SDK I probably already tried with no success.

---

<div class="post-metadata">

**Author:** ![swrcVendetta](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@swrcVendetta](https://forums.unrealengine.com/u/swrcVendetta)\
**Post date:** [July 5, 2023, 1:55am UTC](https://forums.unrealengine.com/t/packaging-for-android-always-fails/1219583/3 "2023-07-05T01:55:54Z")

</div>

After more than 2 days of trying I finally managed to build successfully…  
 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/6/4/8649a77d137242cfd8c2d8e44bdb6dec4780d98b.png)

Problem is I do not even know why it worked this time.  
These are my settings (SDK 30.0.3 being the latest):  
 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/f/d0fcf7dacbed2bff8a7524d9a772905e77c43ee3.png)

Is there any logic behind what combination of JDK, SDK and NDK works or is it just trial and error?
