Android build failed / Error code: 256

I’m not sure which of the several issues in this thread you are referring to when you say you had “the same issue” :slight_smile:

CoronaSDK for macOS hasn’t required any particular version of Java for some time (since build 2750) since it uses Java command line utilities rather than the JNI interface provided by Java 6.  I’m currently using Java 8 (build 1.8.0_71-b15) which is whatever I got the last time the Java updater ran.

Having said that, I have seen at least one case where the Java utilities just didn’t work on a particular computer (that’s most of the posts in this thread) and that is a basic requirement which we can’t work around.

If you have a project that wont build with Java 8, please submit a bug.

I had the same error building up android version with local notifications support.

It was about the lack of the notification icon files in the project root.

I prepared the exact number of the files by the legendary doc dedicated to notification support.

I took a long time to get the right size for each of the file from the IconNotificationDefault* list.

It builds great, BUT crashes on Android device right from the start.

Can anyone please provide the list of exact sizes of the required icons in pix and dpi?

​Any hint how to debug the android device from the Mac?

There was no fix for my problem - still can’t build.

@beernathan: For clarity, Java doesn’t work on your system and it isn’t possible to build Android apps without Java (for any SDK, not just Corona).

Did you ever try re-installing Java?

Yes - that’s right @PerryClarke - have tried completely uninstalling and reinstalling - still not about to build. I’m using another Mac to build just fine, so clearly something local to me.

Hey Perry, 

I’m using Corona latest public release and the latest JDK (1.8+). The project is a simple hello world project.

When I run:

JAVA_TOOL_OPTIONS=’-Duser.language=en’ jarsigner -tsa http://timestamp.digicert.com -keystore /Applications/CoronaSDK/Resource\ Library/Android/debug.keystore -storepass ‘android’ -keypass ‘android’ /Applications/CoronaSDK-2806/Corona\ Simulator.app/Contents/Resources/_coronatest.jar androiddebugkey

I get: 

Picked up JAVA_TOOL_OPTIONS: -Duser.language=en

jarsigner: unable to open jar file: /Applications/CoronaSDK-2806/Corona Simulator.app/Contents/Resources/_coronatest.jar

Any ideas?

Thanks!

Do you have a CoronaSDK installation in the directory  /Applications/CoronaSDK-2806/  ? 

What problem are you trying to solve?

No sorry Perry, I copied the wrong one…

I have corona installed on the CoronaSDK folder, the public release one…

Here it is: 

When I run:

JAVA_TOOL_OPTIONS=’-Duser.language=en’ jarsigner -tsa http://timestamp.digicert.com -keystore /Applications/CoronaSDK/Resource\ Library/Android/debug.keystore -storepass ‘android’ -keypass ‘android’ /Applications/CoronaSDK/Corona\ Simulator.app/Contents/Resources/_coronatest.jar androiddebugkey

I then get:

Picked up JAVA_TOOL_OPTIONS: -Duser.language=en

Exception in thread “main” java.lang.NoSuchMethodError: com.sun.jarsigner.ContentSignerParameters.getTSAPolicyID()Ljava/lang/String;

at sun.security.tools.jarsigner.TimestampedSigner.generateSignedData(TimestampedSigner.java:141)

at sun.security.tools.jarsigner.SignatureFile$Block.<init>(Main.java:2387)

at sun.security.tools.jarsigner.SignatureFile.generateBlock(Main.java:2284)

at sun.security.tools.jarsigner.Main.signJar(Main.java:1279)

at sun.security.tools.jarsigner.Main.run(Main.java:241)

at sun.security.tools.jarsigner.Main.main(Main.java:104)

Any news on this? Cheers!

What are you trying to do?

Build for android

That wasn’t what I was asking. What are you trying to accomplish with this command:

JAVA_TOOL_OPTIONS=’-Duser.language=en’ jarsigner -tsa http://timestamp.digicert.com -keystore /Applications/CoronaSDK/Resource\ Library/Android/debug.keystore -storepass ‘android’ -keypass ‘android’ /Applications/CoronaSDK/Corona\ Simulator.app/Contents/Resources/_coronatest.jar androiddebugkey

This command was suggested by Perry a few posts above, because I have Jdk 8 and can’t build for Android. He said to try the command and post the response. That’s what I did. Honestly Rob, I admire your knowledge of code, but there’s a huge lack of social skills. Firstly, I thought you could just read maybe five Little posts above my last one. Second, “that’s not what I asked” is a very rude, borderlining childish answer. I will say again, admire your knowledge, dislike your social skills and common sense. Here we are exchanging useless posts that could’ve been avoided if you read a few posts above mine, like if you were trying to help with the issue.

@marcos martini as I said in a previous post in this thread:

Obviously, we’d still like to try to help but it’s somewhat out of our hands.  First thing to do is to install the latest version of Java from here

If that doesn’t fix things, do the following and post the results …

What happens if you run:

jarsigner -verbose -verify /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions/A/Resources/LauncherSupport.jar

If that works (aside from saying “jar is unsigned” which is expected), what about:

JAVA\_TOOL\_OPTIONS='-Duser.language=en' jarsigner -tsa http://timestamp.digicert.com -verbose -verify /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions/A/Resources/LauncherSupport.jar

These are just to test how broken Java is.  We can’t reproduce this issue so these commands might work while the actual command needed to sign APKs you posted above continues to fail.

Don’t worry Perry. Re-installed, tried the commands, nothing works. If I use Java 6 is fine, but other than that it still gives me the 256 error. I guess there’s nothing I can do, thanks anyway.

I had that error due to incorrect icons, try to remove all icons from game folder and build without it.

Hey, 

I had the same issue and it was using java 8. After uninstalling and switched to Java 6 it works fine. Is there anyway we can get Corona to do Android builds using Java 7+ on a Mac?

Thanks

What version of Corona SDK are you using?

I thought we had fixed that requirement.

I’m not sure which of the several issues in this thread you are referring to when you say you had “the same issue” :slight_smile:

CoronaSDK for macOS hasn’t required any particular version of Java for some time (since build 2750) since it uses Java command line utilities rather than the JNI interface provided by Java 6.  I’m currently using Java 8 (build 1.8.0_71-b15) which is whatever I got the last time the Java updater ran.

Having said that, I have seen at least one case where the Java utilities just didn’t work on a particular computer (that’s most of the posts in this thread) and that is a basic requirement which we can’t work around.

If you have a project that wont build with Java 8, please submit a bug.

I had the same error building up android version with local notifications support.

It was about the lack of the notification icon files in the project root.

I prepared the exact number of the files by the legendary doc dedicated to notification support.

I took a long time to get the right size for each of the file from the IconNotificationDefault* list.

It builds great, BUT crashes on Android device right from the start.

Can anyone please provide the list of exact sizes of the required icons in pix and dpi?

​Any hint how to debug the android device from the Mac?