Android Build Error 256 - Weird behaviour

Hi all. 

Today I have updated MacOS Catalina and a few hours later I updated Corona to the latest version 2019.3541. Then I installed Java SE 13.0.1 and tried to build but I got error mentioning “cd: template”. I thought it was because of JDK. I deleted Corona, installed 2019.3540 version, but the same error. A few months ago I had the same problem after installing then beta version of MacOS Catalina, and @vlads recommended to run Corona Native Install but I could not find it as on the Launchpad it showed 2019.3535 and when clicking on Corona Native Install, it said it could not run as I have deleted the file, something like that. Then I deleted everything related to Corona from “~Library/” folder and from the folders inside it. I also emptied Trash. Then installed the latest Corona version again but I can not see it when I click on the Launchpad. When I open Application folder and inside it go to Corona-3541 and run the Corona Simulator, it runs but when I try to build, it gives the below error: 

Oct 18 01:13:33.969 Copyright © 2009-2019  C o r o n a   L a b s   I n c .

                    Version: 3.0.0

                    Build: 2019.3541

Oct 18 01:13:33.981 Loading project from:   ~/Development/Apps/test

Oct 18 01:13:33.981 Project sandbox folder: ~/Library/Application Support/Corona Simulator/test-B198670C72C138E28DE4E8C45FCD4837

Oct 18 01:13:34.009 Platform: iPhone / x86_64 / 10.15.0 / Intel Iris Pro OpenGL Engine / 2.1 INTEL-14.0.69 / 2019.3541 / en-AZ | AZ | en_AZ | en

Oct 18 01:13:39.233 Using java version “13.0.1” 2019-10-15

                    Java™ SE Runtime Environment (build 13.0.1+9)

                    Java HotSpot™ 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)

Oct 18 01:13:45.237 Using java version “13.0.1” 2019-10-15

                    Java™ SE Runtime Environment (build 13.0.1+9)

                    Java HotSpot™ 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)

Oct 18 01:13:45.959 Building Android app for bamazy@gmail.com with 2019.3541

Oct 18 01:13:49.158 Using custom build id from app bundle: 00000 (AppSettings.lua)

Oct 18 01:13:49.947 BUILD SUCCESSFUL

                    Total time: 0 seconds

Oct 18 01:13:49.961 sh: line 0: cd: template: No such file or directory

Oct 18 01:13:49.967 Excluding specified files from build: 

                       excluding: LaunchScreen.storyboardc

                       excluding: Icon.png

                       excluding: Icon-*dpi.png

                       excluding: Images.xcassets

                    Android build failed (256) after 0 seconds

Oct 18 01:13:50.241 ERROR: Build Failed: Failed to Build

                    

                    Error code: 256

Oct 18 01:13:50.241 

When I click on the Setup Corona Native from the Applications folder, I get the error on the picture. I don’t if changing JDK caused the problem or updating MacOS Catalina. 

I tried to build for iOS and it worked. I still can’t see the Corona Simulator icon on the Launchpad. Any help?  :frowning:

I’m getting this error too and would love to resolve - want to get updated Android apps out…I have update Java and reinstalled Corona.  Note I haven’t used Corona for a while and I’ve pointed the Android build options to the previous keystore I had.  

What I see:

Oct 19 03:39:20.199 Copyright (C) 2009-2019  C o r o n a   L a b s   I n c .                     Version: 3.0.0                     Build: 2019.3541 Oct 19 03:39:22.329 Copyright (C) 2009-2019  C o r o n a   L a b s   I n c .                     Version: 3.0.0                     Build: 2019.3541 Oct 19 03:39:22.350 Loading project from:   ~/Dropbox/source\_corona/myapp Oct 19 03:39:22.350 Project sandbox folder: ~/Library/Application Support/Corona Simulator/myapp-710F2E2A36D68CA0425A0F22C41B4E27 Oct 19 03:39:22.452 Platform: WindowsPhone / x86\_64 / 10.15.0 / NVIDIA GeForce GT 650M OpenGL Engine / 2.1 NVIDIA-14.0.31 355.11.11.10.10.143 / 2019.3541 / en-AU | AU | en\_AU | en Oct 19 03:39:24.137 No Analytics on Simulator - init Oct 19 03:39:24.948 Country    AU Oct 19 03:39:24.949 Identifier en\_AU                     Local Lang en                     UI Lang    en-AU Oct 19 03:39:30.651 Using java version "1.8.0\_121"                     Java(TM) SE Runtime Environment (build 1.8.0\_121-b13)                     Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode) Oct 19 03:39:30.744 Picked up JAVA\_TOOL\_OPTIONS: -Duser.language=en Oct 19 03:39:30.991 Testing credentials for '/Users/Me/Dropbox/source\_corona/android\_apps\_keystore/androidAppsPrivateKeys.keystore':  Oct 19 03:39:31.030 Picked up JAVA\_TOOL\_OPTIONS: -Duser.language=en Oct 19 03:39:32.286 jar signed. Oct 19 03:39:38.003 Using java version "1.8.0\_121"                     Java(TM) SE Runtime Environment (build 1.8.0\_121-b13)                     Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode) Oct 19 03:39:38.740 Building Android app for me@myemail.com with 2019.3541 Oct 19 03:39:41.350 Using custom build id from app bundle: 00000 (AppSettings.lua) Oct 19 03:39:42.357 BUILD SUCCESSFUL                     Total time: 0 seconds Oct 19 03:39:42.378 sh: line 0: cd: template: No such file or directory Oct 19 03:39:42.390 Android build failed (256) after 1 seconds Oct 19 03:39:42.624 ERROR: Build Failed: Failed to Build                                          Error code: 256 Oct 19 03:39:42.625 

PS.  So I’m trying to get the Android build working simply through the normal approach.  I did have a crack at the Native approach (which I’d rather not have to go through - where you use Android Studio) however I got the same issue too as bamazy where the install script for the link didn’t work…

Any help? Vlads? Rob?  :frowning:

I’m going to copy some stuff from the Android 64-bit pinned post to increase the debugging level:

If you have build problem:
If the build fails, turn on detailed build logging:
On Windows, from the cmd.exe command prompt or Power Shell:

reg ADD “HKEY_CURRENT_USER\Software\Ansca Corona\Corona Simulator\Preferences” /f /v debugBuildProcess /d 5On macOS from the Terminal:
defaults write com.coronalabs.Corona_Simulator debugBuildProcess -int 5

Please capture the log and use pastebin.com or similar and post a link with the much longer console log and see if we can get more information about what’s going on.

Rob

Rob, thanks for the reply. The problem is that I don’t see the Corona icon on the Launchpad. Plus, I guess the Corona is not properly installed as I can not run the Install Corona Native script. 

The build log is here: https://pastebin.com/3BKTipLz

here’s mine:  https://pastebin.com/SWF5WqDS

I’ve sent this to Engineering to investigate.

Rob

This is so bizare. Are you able to build any sample project?

No. Well I created a new simple project and had this problem too. If this is what you meant?

Can you try and build the HelloWorld sample that we ship with Corona?

Rob

HI Rob - I do have the same issue with the sample project - log is https://pastebin.com/pp97HXUi

İ have also tried to build a sample project and got the same error. 

I have installed the latest (2019.3542) version and it’s still the same :( I can’t see the Corona Simulator on Launchpad. However, this time when I tried to run Native script, it was successfull. And I was successful to build for Android. 

I too am experiencing Error Code: 256, and cannot build for Android. 

This has started only after upgrading to macOS Catalina, on a 2016 MacBook 12". Java is updated to latest. 

Occurs on both:

  1. Public Release Build 2018.3326

  2. Daily Build 2019:2544

When I tried building the Hello World project, the build sequence lasted for almost 30 minutes before I cancelled it.

Prior to that, I had to wait 15 minutes to build one of my projects only to encounter Error 256.

Building for macOS works. I haven’t tested building for iOS. 

______

I will keep everyone updated if there are any new developments. 

The first time you build for Android, we have to download a bunch of support files. This first build can take a while depending on your network connectivity to the server where the content lives. You need to let this first build go through. Possibly cancelling it may have left that install in weird state.

If you go to the Android 64 bit beta forum, there is a pinned post with a command you can run to increase the information in your console log regarding building. Once you do that, restart Corona and capture the entire build log. It will be huge, so use a service like pastebin.com to paste the log in to and share the link here.

Rob

I recommend to use Java 1.8, latest version of it.

@vlads, I just installed the latest version and when checking, it shows the version as this: java version “13.0.1” 2019-10-15

I don’t know if it’s the one you mentioned. By the way, after updating the Java version, I deleted the Corona folder from the Applications folder and installed the latest version again. However, on the Launchpad I don’t see the Corona Simulator icon but Corona folder with the Corona Builder, Corona Enterprise and Corona Native icons. 

I haven’t checked building yet but before updating, I was able to build both for Android and iOS. I’ll check and update here if I face any problem. 

Again, Java should be 1.8, not 13.0. You can get Java 8 on same page as 13

Also, see this thread: https://forums.coronalabs.com/topic/76350-notification-plugin-build-error-on-android/?p=402817

I installed and set the java version to 1.8 but the Corona Simulator is still not on the Launchpad.