Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Android Build Error 256 - Weird behaviour
Started by bamazy Oct 17 2019 09:33 AM

25 replies to this topic

Best Answer vlads , 27 October 2019 - 02:29 AM

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

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

bamazy

[GLOBAL: userInfoPane.html]
bamazy
  • Contributor

  • 107 posts
  • Corona SDK

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. 

Attached Files



[TOPIC: post.html]
#2

bamazy

[GLOBAL: userInfoPane.html]
bamazy
  • Contributor

  • 107 posts
  • Corona SDK

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



[TOPIC: post.html]
#3

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Contributor

  • 920 posts
  • Corona SDK

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



[TOPIC: post.html]
#4

bamazy

[GLOBAL: userInfoPane.html]
bamazy
  • Contributor

  • 107 posts
  • Corona SDK

Any help? Vlads? Rob?  :(



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,300 posts
  • Enterprise

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



[TOPIC: post.html]
#6

bamazy

[GLOBAL: userInfoPane.html]
bamazy
  • Contributor

  • 107 posts
  • Corona SDK

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



[TOPIC: post.html]
#7

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Contributor

  • 920 posts
  • Corona SDK

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



[TOPIC: post.html]
#8

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,300 posts
  • Enterprise

I've sent this to Engineering to investigate.

 

Rob



[TOPIC: post.html]
#9

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 921 posts
  • Corona Staff

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



[TOPIC: post.html]
#10

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Contributor

  • 920 posts
  • Corona SDK

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

[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,300 posts
  • Enterprise

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

 

Rob



[TOPIC: post.html]
#12

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Contributor

  • 920 posts
  • Corona SDK

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



[TOPIC: post.html]
#13

bamazy

[GLOBAL: userInfoPane.html]
bamazy
  • Contributor

  • 107 posts
  • Corona SDK

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



[TOPIC: post.html]
#14

bamazy

[GLOBAL: userInfoPane.html]
bamazy
  • Contributor

  • 107 posts
  • Corona SDK

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. 



[TOPIC: post.html]
#15

spidrsqid

[GLOBAL: userInfoPane.html]
spidrsqid
  • Observer

  • 1 posts
  • Corona SDK

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. 



[TOPIC: post.html]
#16

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,300 posts
  • Enterprise

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


  • spidrsqid likes this

[TOPIC: post.html]
#17

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 921 posts
  • Corona Staff

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


  • spidrsqid likes this

[TOPIC: post.html]
#18

bamazy

[GLOBAL: userInfoPane.html]
bamazy
  • Contributor

  • 107 posts
  • Corona SDK

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



[TOPIC: post.html]
#19

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 921 posts
  • Corona Staff

  Best Answer

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



[TOPIC: post.html]
#20

bamazy

[GLOBAL: userInfoPane.html]
bamazy
  • Contributor

  • 107 posts
  • Corona SDK

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



[TOPIC: post.html]
#21

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 921 posts
  • Corona Staff

Can you share full build log please?

 

EDIT: See how to get full log here: https://forums.coronalabs.com/topic/75790-handling-bugs-with-android-x64-and-target-sdk-28/



[TOPIC: post.html]
#22

bamazy

[GLOBAL: userInfoPane.html]
bamazy
  • Contributor

  • 107 posts
  • Corona SDK

I restarted the Mac and now the Corona Simulator is on the Launchpad  :(

 

I noticed that on build the Corona still sees Java 13.0.1 although when checking on terminal Java version is 1.8.

 

The build is successful but in case it might be useful to catch the java version problem, the logs are here: https://pastebin.com/K0NGarsh



[TOPIC: post.html]
#23

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 921 posts
  • Corona Staff

Glad it worked out.



[TOPIC: post.html]
#24

greg886

[GLOBAL: userInfoPane.html]
greg886
  • Contributor

  • 920 posts
  • Corona SDK



I've sent this to Engineering to investigate.

 

Rob

 

@Rob - Any update from Engineering?   [I was using java version "1.8.0_121"]



[TOPIC: post.html]
#25

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 921 posts
  • Corona Staff

Hey, greg886. I noticed that your Corona is started from 'randomized' location (it's a security feature of macOS, called gatekeeper path randomization). I don't know why it kicks in. Try downloading latest daily build, and using DMG interface to copy over Corona directory as it is.




[topic_controls]
Page 1 of 2 1 2
 
[/topic_controls]