# Android build error java.lang.NullPointerException

**URL:** <https://forums.solar2d.com/t/android-build-error-java-lang-nullpointerexception/356673>\
**Category:** Other\
**Created:** [July 22, 2024, 12:26am UTC](https://forums.solar2d.com/t/android-build-error-java-lang-nullpointerexception/356673 "2024-07-22T00:26:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![antoniojpr](https://forums.solar2d.com/user_avatar/forums.solar2d.com/antoniojpr/32/3941_2.png) [@antoniojpr](https://forums.solar2d.com/u/antoniojpr)\
**Post date:** [July 22, 2024, 12:26am UTC](https://forums.solar2d.com/t/android-build-error-java-lang-nullpointerexception/356673/1 "2024-07-22T00:26:29Z")

</div>

Hello, I am trying solar2d, I installed Solar2D 2024.3707, created a new project and copying the code from the BalloonTap example into main.lua.

In the simulator it runs perfectly, and also when building a Windows application, but when building the Android application it returns an error.

I have tried installing/uninstalling Java Development Kit 8u421, and also Java Development Kit 22.0.2, and the same error continues.

This is what the console shows:

19:06:57.871 Copyright (C) 2009-2024 C o r o n a L a b s I n c .  
19:06:57.871 Version: 3.0.0  
19:06:57.871 Build: 2024.3707  
19:06:57.871 Platform: SM-G991x / x64 / 10.0 / NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2 / 4.6.0 NVIDIA 536.40 / 2024.3707 / es\_ES | ES | es\_ES | es  
19:06:57.871 Loading project from: C:\Users\anton\Documents\Corona Projects\BalloonTap  
19:06:57.871 Project sandbox folder: C:\Users\anton\AppData\Local\Corona Labs\Corona Simulator\Sandbox\balloontap-AF549ECFA2E9699372680ED3729E7034\Documents  
19:07:26.320 Testing credentials for ‘C:\Program Files (x86)\Corona Labs\Corona\Resources\debug.keystore’:  
19:07:27.483 Picked up JAVA\_TOOL\_OPTIONS: -Duser.language=en  
19:07:27.483 jar signed.  
19:07:27.483  
19:07:27.483 Warning:  
19:07:27.483 The signer’s certificate is self-signed.  
19:07:27.483  
19:07:27.483 The timestamp will expire on 2031-11-10.  
19:07:47.423 Excluding specified files from build:  
19:07:47.423 excluding: LaunchScreen.storyboardc  
19:07:47.423 excluding: Icon.png  
19:07:47.423 excluding: Icon-\*dpi.png  
19:07:47.423 excluding: Images.xcassets  
19:07:47.423 Picked up JAVA\_TOOL\_OPTIONS: -Duser.language=en  
19:07:47.423 ERROR:C:\Users\anton.gradle\caches\transforms-3\e95fefe9e0be489136c0dc2d76aa5df8\transformed\jetified-Corona\jars\classes.jar: D8: java.lang.NullPointerException  
19:07:47.423  
19:07:47.423 FAILURE: Build failed with an exception.  
19:07:47.423  
19:07:47.423 \* What went wrong:  
19:07:47.423 Execution failed for task ‘:App:desugarReleaseFileDependencies’.  
19:07:47.423 \> A failure occurred while executing com.android.build.gradle.internal.tasks.DexFileDependenciesTask$DexFileDependenciesWorkerAction  
19:07:47.423 \> Error while dexing.

---

<div class="post-metadata">

**Author:** ![Kan98](https://forums.solar2d.com/user_avatar/forums.solar2d.com/kan98/32/2224_2.png) [@Kan98](https://forums.solar2d.com/u/Kan98)\
**Post date:** [July 22, 2024, 12:56am UTC](https://forums.solar2d.com/t/android-build-error-java-lang-nullpointerexception/356673/2 "2024-07-22T00:56:18Z")

</div>

3707 version got this issue, you should try 3706.

---

<div class="post-metadata">

**Author:** ![colinmorgan](https://forums.solar2d.com/user_avatar/forums.solar2d.com/colinmorgan/32/241_2.png) [@colinmorgan](https://forums.solar2d.com/u/colinmorgan)\
**Post date:** [July 22, 2024, 8:02am UTC](https://forums.solar2d.com/t/android-build-error-java-lang-nullpointerexception/356673/3 "2024-07-22T08:02:05Z")

</div>

This issue has been logged as a bug on GitHub- hopefully we can get a stable main build out soon.

---

<div class="post-metadata">

**Author:** ![antoniojpr](https://forums.solar2d.com/user_avatar/forums.solar2d.com/antoniojpr/32/3941_2.png) [@antoniojpr](https://forums.solar2d.com/u/antoniojpr)\
**Post date:** [July 23, 2024, 11:51am UTC](https://forums.solar2d.com/t/android-build-error-java-lang-nullpointerexception/356673/4 "2024-07-23T11:51:06Z")

</div>

I have tried it with 3706 and it builds the Android apk without errors, thank you.

---

<div class="post-metadata">

**Author:** ![system](https://forums.solar2d.com/uploads/default/original/1X/1bf6a947166df24e92aaa3358558f4b82d7f3d5a.png) [@system](https://forums.solar2d.com/u/system)\
**Post date:** [January 19, 2025, 11:51am UTC](https://forums.solar2d.com/t/android-build-error-java-lang-nullpointerexception/356673/5 "2025-01-19T11:51:53Z")

</div>

Closed on January 19, 2025, 11:51am UTC

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