Error in android build

Hello.
I’m completely beginner in corona SDK and android.
I want to build android app but I got this error (a simple program that just show a picture):

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:App:checkReleaseDuplicateClasses’.
    1 exception was raised by workers:
    java.util.zip.ZipException

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See https://docs.gradle.org/6.8.3/userguide/command_line_interface.html#sec:command_line_warnings


I want to know what does it mean and how can I solve this problem. If you know of a source for reading about this topic, please let me know

I use Solar2D Simulator 2021.3644
windows 10 64bit Enterprise
OS build 10586.1540
Windows Defender

can you send me the whole project folder … send it as a zipped file her … or post your code

Yes sure.
hello.7z (59.5 KB)

the first thing i did was to build an apk, and it worked which means the problem is not in the project folder or code …

Without doing any research I think it might be due to one of the following factors:

  • the latest Solar2D build might have problems (mostly unlikely)

  • Your JDK version is outdated or too new

  • you need to clear the caches in windows users directory (if you are using a windows PC) and then build again which will take very long for the first time … please see attached image

1 Like

In this folder I have just .android and .gradle (There is not .cache)
I deleted (.android and .gradle) .
Then I deleted AppData\Local\Temp contents and used Disk cleanup to clean other temp files.
I tried to build android apk again. But the same problem exists.


I use jdk1.8.0_281

Solar2D (not Corona SDK, that’s old news :stuck_out_tongue:) comes with embedded Java since build 3629, so you shouldn’t need to have Java. If that’s the project you are building, there should be no issues with it.

Are you building using the simulator or are you doing native builds?

1 Like

It was a verbal mistake :grinning: I meant the solar2D
Do you mean to remove the JDK from my system?
I use simulator.

1 Like

You could try uninstalling that version of Java, I don’t see the harm in trying.

Solar2D should work without external Java installations, so I’m not sure if Java itself is the issue here, i.e. your version of JDK shouldn’t be accessed by Solar2D. Still, you can try uninstalling and if even after uninstalling it doesn’t work, you could try installing jdk-8u261-windows-i586 as is described in the docs.

1 Like

use jdk15

1 Like

I tried uninstalling jdk but it doesn’t work (with the same error).
I installed jdk-8u261-windows, It doesn’t work too (with the same error) :frowning:
I really can not understand where the problem comes from

I tried jdk 15 but it doesn’t work too (with the same error)

Please try one more thing … i remember this thing happened with me once (almost similar)

Completely Uninstall Solar2D, and delete any traces of Solar2D or Corona Folders inside “C:\Program Files” and “C:\Program Files (x86)” or wherever your installation is

also go to “C:\Users\%your PC user name%\AppData\Roaming” and delete all traces of Solar2D and Corona

and goto “C:\Users\%your PC user name%\AppData\Local” and delete all traces of Solar2D and Corona

and goto “C:\Users\%your PC user name%” and delete .android .cache and ,gradle folders

Restart PC

Install a clean and fresh version of Solar2D and make a new apk build, if that does not work try to downgrade the version of installed Solar2D …

2 Likes

This solution worked! :grinning: :+1:
I really thank you for taking the time to explain the solution. :ok_hand:

1 Like

Anytime Arefeh :+1: … glad I could help you

A post was split to a new topic: Unable to build for Android