Cannot build for Android. Error 256. Gradle issues?

Hi all. I’ve been using Solar2D/Corona for many years and i’m completely stuck. I’m not able to build for Android, even with the debug keystore and using any corona sample projects. (iOS works fine.)

I’ve read every single forum related to Error 256 and nothing is working. I’m on a macbook pro apple m1 chip with MacOS 11.6. Using build 2021.3656 (plus multiple others).

Here’s the console error:

Copyright (C) 2009-2021  C o r o n a   L a b s   I n c .
                	Version: 3.0.0
                	Build: 2021.3656

Sep 23 22:03:45.665 Loading project from: /Applications/Corona-3656/SampleCode/Physics/Bullet
Sep 23 22:03:45.665 Project sandbox folder: ~/Library/Application Support/Corona Simulator/Bullet-80FD10E4D3ACE28011CE1F84649569A7
Sep 23 22:03:45.666 Platform: iPhone / unknown / 11.6.0 / Apple M1 / 2.1 Metal - 71.7.1 / 2021.3656 / en-US | US | en_US | en
Sep 23 22:03:48.778 Using openjdk version “1.8.0_242-release”
OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
OpenJDK 64-Bit Server VM (build 25.242-b3-6915495, mixed mode)
Sep 23 22:03:50.671 Using openjdk version “1.8.0_242-release”
OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
OpenJDK 64-Bit Server VM (build 25.242-b3-6915495, mixed mode)
Sep 23 22:04:05.558 BUILD SUCCESSFUL
Total time: 13 seconds
Sep 23 22:04:18.806 FAILURE: Build failed with an exception.

                * What went wrong:
                Execution failed for task ':App:checkReleaseAarMetadata'.
                > Could not resolve all files for configuration ':App:releaseRuntimeClasspath'.
                   > Could not find :Corona:.
                     Searched in the following locations:
                       - file:/Users/gregoryhargis/Library/Application Support/Corona/Native/Corona/android/lib/gradle/Corona.aar
                       - file:/Users/gregoryhargis/Library/Application Support/Corona/Native/Corona/android/lib/Corona/libs/Corona.aar
                     Required by:
                         project :App
                   > Could not find :licensing-google:.
                     Searched in the following locations:
                       - file:/Users/gregoryhargis/Library/Application Support/Corona/Native/Corona/android/lib/gradle/licensing-google.jar
                       - file:/Users/gregoryhargis/Library/Application Support/Corona/Native/Corona/android/lib/Corona/libs/licensing-google.jar
                     Required by:
                         project :App
                
                * Try:
                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.
                
                * Get more help at https://help.gradle.org
                
                BUILD FAILED in 12s

Sep 23 22:04:19.350 Android build failed (256) after 28 seconds
Sep 23 22:04:19.717 ERROR: Build Failed: Error code: 256

Any help would be greatly appreciated. If you are willing to take the time and do a screenshare/video chat with me, I’m willing to pay for your time and support. I’m on a rushed deadline to get an update done. Reply here if you are willing. (unless there’s a direct way to message on here??)

Thanks. This community has helped me a number of times. You all are awesome.

@gregoryhargis
Can you please post your build and config files?

Thanks @mysticeti . I was using any of the Corona sample projects that come pre-installed in the Sample project files. In this case, I was using “Corona-Cannon Master” project un-edited.

config.lua (676 Bytes) build.settings (3.6 KB)

Can you please try to build a sample project that comes with solar2d for example in Sample Code folder > Physics > HelloPhysics project.

Looking into the exception I can understand that licensing-google could not be found. Have you included in your build settings file according to https://docs.coronalabs.com/api/library/licensing/index.html

I found a similar issue about licensing-google issue due to old project migrating to new one as there has been some structural changes. Corona-3552 (Project Templates - App) Android build Error - Missing licensing-google.jar. Try building an empty project and see whether it builds or not

Thanks again for helping out.
I have tried the Sample Code Physics > HelloPhysics project among others with the same results.

I also created a new template app as you suggested, again with the same results. I did a screen recording of the process so hopefully that will help. Any additional thoughts? Feeling like I haven’t installed something correctly?
https://gregoryhargis.com/videos/android_build_fail.mov

Can you try delete(you can alway get it out of trash) any old versions of Corona Simulator you have on your computer?

Thanks @Scott_Harrison for replying. I just trashed and did a “secure empty trash” of an older Simulator version. I also just went into the hidden files of the simulator and trashed the “Android Build/SDK” so that it would think it was the first time building for Android and download the SDK again.

I’m still having issues.

                * What went wrong:
                Execution failed for task ':App:checkReleaseAarMetadata'.
                > Could not resolve all files for configuration ':App:releaseRuntimeClasspath'.
                   > Could not find :Corona:.
                     Searched in the following locations:
                       - file:/Users/gregoryhargis/Library/Application Support/Corona/Native/Corona/android/lib/gradle/Corona.aar
                       - file:/Users/gregoryhargis/Library/Application Support/Corona/Native/Corona/android/lib/Corona/libs/Corona.aar
                     Required by:
                         project :App
                   > Could not find :licensing-google:.
                     Searched in the following locations:
                       - file:/Users/gregoryhargis/Library/Application Support/Corona/Native/Corona/android/lib/gradle/licensing-google.jar
                       - file:/Users/gregoryhargis/Library/Application Support/Corona/Native/Corona/android/lib/Corona/libs/licensing-google.jar
                     Required by:
                         project :App
                
                * Try:
                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.
                
                * Get more help at https://help.gradle.org

Do you have any other simulator versions? You might try deleting and redownloading 3656

The issue is inside Corona Application folder/Native, there seems to be a some important files missing.

I have the same issue on both platform ( Mac and windows ) it looks like the problem is in solar2D installation. can you post the correct corona folder please ?

I just installed solar2d for the first time on a new pc and having similar issues with @gregoryhargis.

There are several similar posts about people not be able to build.
It’s not a coincidence.
@Vlads you should spend some time and check it.

edit: Now I’m able to build on pc and some other issues I had are gone. Don’t know what to say :slight_smile:

Thanks very much @Scott_Harrison. I did delete all of my corona applications and did a secure empty trash. Reinstalled Corona-3656 and it worked. Thanks.

1 Like