Build Failed Error code 256 with HelloWorld Debug

Downloaded Corona 3540, and attempted to build the included HelloWorld for Android for the first time with the new architecture, using Debug Keystore.

Oct 15 08:12:20.900 FAILURE: Build failed with an exception. \* What went wrong: Oct 15 08:12:20.900 Execution failed for task ':App:packageRelease'. \> Oct 15 08:12:20.901 A failure occurred while executing$ActionFacade \> Oct 15 08:12:20.912 Failed to read key androiddebugkey from store "/Applications/Corona-3540/Corona": Cannot recover key Oct 15 08:12:20.913 \* 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 BUILD FAILED in 37s Oct 15 08:12:21.401 Android build failed (256) after 41 seconds Oct 15 08:12:21.762 ERROR: Build Failed: Failed to Build Error code: 256

I then tried several custom Keystores (which I have used in the past successfully to deploy to app stores), 

and then appeared to build fine, with no errors.

However, when I opened the project associated with one of these custom keys, the error 256 returned.

This kind of errors happen to me often when I build for production and then switch back to build for debug. In that case I restart the Corona simulator and it builds without error. 

Thanks, but unfortunately, restarting does not help. I am still unable to build using the Debug key.

Do you see “Debug” option when you try to build? Like the first one on the list on the image? If you choose the debug keystore file from “/Applications/Corona-3540/Corona”, you will have to choose every time you install a newer version. As you can see on the image, I have three Debug keystore options. I can not use the below ones as I have updated the Corona and the paths they link to do not exist anymore. Because of that, I use the first Debug option. 

By the way, after writing the post, I noticed the differences between your path and the path I have used for debugging. Then I checked Corona’s Distributon page and found the below information. The reason you can not build might be that you don’t use the right debug,keystore file. 

Signing for Debug Build

For debug builds, Corona includes a debug.keystore for testing your app on devices. To use it, follow these steps:

Select Debug from the Keystore menu.

Directly to the right, Browse… to the keystore file in the Corona SDK application folder:

Windows — C:\Program Files (x86)\Corona Labs\Corona\Resources\debug.keystore

macOS — /Applications/Corona/Resources/Resource Library/Android/debug.keystore

Select the file and enter android as the password.

In the Key Alias menu, select androiddebugkey.

You may need to update your Java JDK (or possibly downgrade it). Most people are having the best results with JDK 1.8, though I think some people are doing okay with 1.13. 

You probably want to get the version from Oracle as I’m not sure how well OpenJDK works.



I was already running 1.8, but I guess it wasn’t the latest version. I updated it to the latest available, and it does seem to have solved the problem.