# Android Packaging isn't working because of Gradle

**URL:** <https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590>\
**Category:** Mobile\
**Tags:** unreal-engine, Android\
**Created:** [January 4, 2018, 6:01pm UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590 "2018-01-04T18:01:44Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![chineseducks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@chineseducks](https://forums.unrealengine.com/u/chineseducks)\
**Post date:** [September 17, 2019, 2:48am UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/21 "2019-09-17T02:48:53Z")

</div>

I tried EVERYTHING after searching for hours and eventually I found a fix for me…

•Exit the engine entirely and close out anything that might be using gradle.  
•Go to “C:\Users\*USERNAME\*.gradle” and delete the “cache” folder. Or rename it “cacheBACKUP” or something to be cautious.

Worked like a charm for me.

---

<div class="post-metadata">

**Author:** ![DEBCal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DEBCal](https://forums.unrealengine.com/u/DEBCal)\
**Post date:** [January 16, 2020, 7:06am UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/22 "2020-01-16T07:06:38Z")

</div>

Also having issues packaging. Extract of log below

[2020.01.16-06.36.26:215][550]UATHelper: Packaging (Android (ASTC)): :downloader\_library:generateDebugSources UP-TO-DATE  
[2020.01.16-06.36.26:215][550]UATHelper: Packaging (Android (ASTC)): :downloader\_library:javaPreCompileDebug UP-TO-DATE  
[2020.01.16-06.36.26:552][551]UATHelper: Packaging (Android (ASTC)): :downloader\_library:compileDebugJavaWithJavac FAILED  
[2020.01.16-06.36.26:552][551]UATHelper: Packaging (Android (ASTC)): FAILURE: Build failed with an exception.  
[2020.01.16-06.36.26:552][551]UATHelper: Packaging (Android (ASTC)): \* What went wrong:  
[2020.01.16-06.36.26:552][551]UATHelper: Packaging (Android (ASTC)): Execution failed for task ‘:downloader\_library:compileDebugJavaWithJavac’.  
[2020.01.16-06.36.26:552][551]UATHelper: Packaging (Android (ASTC)): \> Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0\_231 contains a valid JDK installation.  
[2020.01.16-06.36.26:552][551]UATHelper: Packaging (Android (ASTC)): \* Try:  
[2020.01.16-06.36.26:552][551]UATHelper: Packaging (Android (ASTC)): Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.  
[2020.01.16-06.36.26:552][551]UATHelper: Packaging (Android (ASTC)): \* Get more help at [https://help.gradle.org](https://help.gradle.org)  
[2020.01.16-06.36.26:552][551]UATHelper: Packaging (Android (ASTC)): BUILD FAILED in 21s  
[2020.01.16-06.36.26:552][551]UATHelper: Packaging (Android (ASTC)): 30 actionable tasks: 3 executed, 27 up-to-date  
[2020.01.16-06.36.27:218][552]UATHelper: Packaging (Android (ASTC)): ERROR: cmd.exe failed with args /c “C:\Users\Dino\Documents\Unreal Projects\DEBCalProject\Intermediate\Android\APK\gradle\rungradle.bat” :app:assembleDebug  
[2020.01.16-06.36.27:218][552]UATHelper: Packaging (Android (ASTC)): (see C:\Users\Dino\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE\_4.24\Log.txt for full exception trace)  
[2020.01.16-06.36.27:218][552]UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=1 (Error\_Unknown)  
[2020.01.16-06.36.27:218][552]UATHelper: Packaging (Android (ASTC)): BUILD FAILED  
[2020.01.16-06.36.27:218][552]PackagingResults: Error: Unknown Error  
[2020.01.16-06.37.48:889][909]LogSlate: Took 0.013221 seconds to synchronously load lazily loaded font ‘…/…/…/Engine/Content/Slate/Fonts/DroidSansMono.ttf’ (77K)

It fails at “:downloader\_library:compileDebugJavaWithJavac FAILED” apparently because it cannot find tools.jar, which sure enough does not exist anywhere on my PC. Best I can tell I have jre1.8.0\_231 installed. So why does it not contain tool.jar? or how can I get tools.jar?

I have gone to Android Codeworks chooser.exe and have updated what I could. I have a problem with the NVidia Tegra installation though, it keeps complaining that no Visual Studio is installed (even though it is) and stops the installation. From what I read, UnReal prefers VS 2015 (I cannot find it online) but does work with VS2019, which I have installed.

I am currently updating Android SDK via the android.bat command mentioned by Mint Gorillaz.

Any assistance is welcome.

P.S. → just cannot understand why devs don’t simplify installation processes. It’s rather frustrating to waste so much time just getting everything setup. I fiddled with UnReal now for 5 years and have very little to show for it. It took me 3 months to self-learn Unity and produce an end product.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c6f3397d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c6f3397d](https://forums.unrealengine.com/u/anonymous_user_c6f3397d)\
**Post date:** [January 19, 2020, 10:09pm UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/23 "2020-01-19T22:09:17Z")

</div>

Hello! I need your help. I faced the same problem. all of the above did not help me.  
сhooser.exe does not update anything. and android.bat doesn’t update anything. I indicated the path to the SDK and NDK in the engine. I accepted the license. but still getting this error.  
please help me. I’m desperate

---

<div class="post-metadata">

**Author:** ![Ravencroft3D](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ravencroft3d/32/753295_2.png) [@Ravencroft3D](https://forums.unrealengine.com/u/Ravencroft3D)\
**Post date:** [March 28, 2020, 7:18am UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/24 "2020-03-28T07:18:16Z")

</div>

> [@gameDNA](#):
>
> Go to Project Settings -\> Android -\> and click on button “Accept SDK License”.

no matter how many times i click on it and accept it… it does not take. i never grays out or accepts my ‘accept’ click. suggestions? using 4.24.

---

<div class="post-metadata">

**Author:** ![Ravencroft3D](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ravencroft3d/32/753295_2.png) [@Ravencroft3D](https://forums.unrealengine.com/u/Ravencroft3D)\
**Post date:** [March 28, 2020, 7:27am UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/25 "2020-03-28T07:27:21Z")

</div>

> [@anonymous\_user\_467364cd](#):
>
> It works but, only if you have got your files installed from codeworks first. Thank you to Paul Eckhardt on “the question authority”.site.
> 
> ![collage.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/4/84b94cfac969a9e89ce36509397351d6ef14ee57.jpeg)

on your pics, the area you circled, where did you find the info to put there? i’ve had to create so many different google pages for different keys and such that i am unsure where this info would be located? this is my first time setting this up. i cannot get the accept SDK license to actually ‘accept’ so i am hoping this solves the issue if i can find where to locate the info to put there…

---

<div class="post-metadata">

**Author:** ![Ravencroft3D](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ravencroft3d/32/753295_2.png) [@Ravencroft3D](https://forums.unrealengine.com/u/Ravencroft3D)\
**Post date:** [March 28, 2020, 1:47pm UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/26 "2020-03-28T13:47:04Z")

</div>

i have tried all the suggestions here, and i still can’t get the keystore key to run. it tells me keytool is invalid. i updated the java pack, added paths to everywhere, the stuff is all in the right places and i keep getting the error. i cannot move forward until i get this sorted out and am at a loss as to what to try next.

---

<div class="post-metadata">

**Author:** ![psymnoper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@psymnoper](https://forums.unrealengine.com/u/psymnoper)\
**Post date:** [April 30, 2020, 10:05am UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/27 "2020-04-30T10:05:49Z")

</div>

> [@](#):
>
> Everyone is wrong here; the module has updated. I had the same problem. While you install SDK there is one updated module you have to unselect all first and only select Updated module and update it, then Gradle is going to work, nothing else will help, I surprised Epic Developers are not aware of such an issue.

i am an android developer. So just a small doubt. How to get gradle in unreal engine? I want to add firebase to project in unreal engine? How to do that?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b1722c93](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b1722c93](https://forums.unrealengine.com/u/anonymous_user_b1722c93)\
**Post date:** [July 28, 2020, 4:34am UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/28 "2020-07-28T04:34:34Z")

</div>

I am also getting the same problem in unreal 4,25.1

---

<div class="post-metadata">

**Author:** ![BlackONnet](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BlackONnet](https://forums.unrealengine.com/u/BlackONnet)\
**Post date:** [February 16, 2021, 1:47am UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/29 "2021-02-16T01:47:35Z")

</div>

Hey ! Iam using 4.26 and it requires android studio and vs community 2019. i have same problem yesterday. 3 times i make my project from beginning again and again. but finally i know that makes UE4 gradle error. the visual studio and android studio did auto update. so what i did is :

1. deleteing Intermediate Folder
2. deleting Saved Folder
3. [Important] Deleteing Binaries Folder

and last. rebuild project.  
and it works HAHA i dont need to make a project from beginning and recode it again.

hope it will help 🙂 thanks !

---

<div class="post-metadata">

**Author:** ![Bob3DGames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob3DGames](https://forums.unrealengine.com/u/Bob3DGames)\
**Post date:** [March 18, 2021, 7:22pm UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/30 "2021-03-18T19:22:47Z")

</div>

> [@chineseducks](#):
>
> I tried EVERYTHING after searching for hours and eventually I found a fix for me…
> 
> •Exit the engine entirely and close out anything that might be using gradle.  
> •Go to “C:\Users\*USERNAME\*.gradle” and delete the “cache” folder. Or rename it “cacheBACKUP” or something to be cautious.
> 
> Worked like a charm for me.

That worked for me too. Thank you!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_04d84d961](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_04d84d961](https://forums.unrealengine.com/u/anonymous_user_04d84d961)\
**Post date:** [May 8, 2021, 1:14am UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/31 "2021-05-08T01:14:19Z")

</div>

Watch this video, It will explain.

---

<div class="post-metadata">

**Author:** ![Noweed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/noweed/32/477944_2.png) [@Noweed](https://forums.unrealengine.com/u/Noweed)\
**Post date:** [May 14, 2021, 4:55am UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/32 "2021-05-14T04:55:25Z")

</div>

this will only work with older versions not the latest version which I am using and none of the above worked for me.

---

<div class="post-metadata">

**Author:** ![Hawk\_Apoorv](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hawk\_Apoorv](https://forums.unrealengine.com/u/Hawk_Apoorv)\
**Post date:** [November 7, 2021, 3:55pm UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/33 "2021-11-07T15:55:38Z")

</div>

did you solve it??

---

<div class="post-metadata">

**Author:** ![ngominhtri068](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ngominhtri068](https://forums.unrealengine.com/u/ngominhtri068)\
**Post date:** [December 25, 2021, 2:54am UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/34 "2021-12-25T02:54:23Z")

</div>

None of it work for me. Here what i done so far and failed.

1. Delete saved folder, intermediate folder, binaries folder, rebuild.

2. Delete gradle cache folder.

3. Switch to another sdk, ndk version in android studio

4. Download all version of sdk, ndk in android studio. And set unreal project to use latest.

5. Download java jdk. Latest version. Set unreal jdk path to that jave jdk.

6. Download NVpack, but i cant see update module anywhere.

7. Set sdk path, ndk path of unreal project to  
sdk, ndk of NVpack

8.run gradle.bat manually

1. Turn off firewall, set firewall to allow andoird studio connect internet.

All of it failed. Somebody help me

---

<div class="post-metadata">

**Author:** ![THE\_N1YO](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@THE\_N1YO](https://forums.unrealengine.com/u/THE_N1YO)\
**Post date:** [August 2, 2022, 3:17pm UTC](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590/35 "2022-08-02T15:17:07Z")

</div>

does it got solve ? i am same as you and its so frustrating nothing is working

[Previous page](https://forums.unrealengine.com/t/android-packaging-isnt-working-because-of-gradle/104590.md?page=1)
