Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Build Failed Error code 256 with HelloWorld Debug
Started by jmaher Oct 15 2019 05:34 PM

6 replies to this topic

Best Answer jmaher , 17 October 2019 - 07:14 AM

Rob,

 

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.

 

Thanks!

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

jmaher

[GLOBAL: userInfoPane.html]
jmaher
  • Enthusiast

  • 63 posts
  • Corona SDK

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 com.android.build.gradle.internal.tasks.Workers$ActionFacade
                       > 
Oct 15 08:12:20.912 com.android.ide.common.signing.KeytoolException: Failed to read key androiddebugkey from store "/Applications/Corona-3540/Corona Simulator.app/Contents/Resources/debug.keystore": 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 https://help.gradle.org
                    
                    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.



[TOPIC: post.html]
#2

bamazy

[GLOBAL: userInfoPane.html]
bamazy
  • Contributor

  • 131 posts
  • Corona SDK

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. 



[TOPIC: post.html]
#3

jmaher

[GLOBAL: userInfoPane.html]
jmaher
  • Enthusiast

  • 63 posts
  • Corona SDK

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



[TOPIC: post.html]
#4

bamazy

[GLOBAL: userInfoPane.html]
bamazy
  • Contributor

  • 131 posts
  • Corona SDK

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 Simulator.app/Contents/Resources/debug.keystore", 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. 

Attached Files



[TOPIC: post.html]
#5

bamazy

[GLOBAL: userInfoPane.html]
bamazy
  • Contributor

  • 131 posts
  • Corona SDK

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:

  1. Select Debug from the Keystore menu.

  2. 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

  1. Select the file and enter android as the password.

  2. In the Key Alias menu, select androiddebugkey.



[TOPIC: post.html]
#6

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,400 posts
  • Enterprise

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.

 

Rob



[TOPIC: post.html]
#7

jmaher

[GLOBAL: userInfoPane.html]
jmaher
  • Enthusiast

  • 63 posts
  • Corona SDK

  Best Answer

Rob,

 

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.

 

Thanks!




[topic_controls]
[/topic_controls]