Android Build Failed (1)

Having trouble building for Android release.  Application will build in debug mode.  Will not build in release.  Attempted Hello World with same release keys, also fails.  Attempted HelloWorld with generic debug key, that works.  Turned on more debug info with regedit, but i don’t see anything helpful.  I’m using 2017.3183.


MY APP WITH RELEASE


06:00:24.981  Testing credentials for ‘C:\Users\alber\keystores\release.keystore’: 

06:00:25.605  Picked up JAVA_TOOL_OPTIONS: -Duser.language=en

06:00:25.618  WebServices: Call: system.connect 

06:00:26.245  WebServices: Response received in 1 seconds

06:00:26.245  WebServices: Call: corona.getTime 

06:00:26.808  WebServices: Response received in 0 seconds

06:00:26.808  WebServices: Call: user.login2 

06:00:27.483  WebServices: Response received in 1 seconds

06:00:27.483  Using custom build id from app bundle: 00000 (AppSettings.lua)

06:00:27.483  

06:00:27.483  Using custom Build Id 00000

06:00:27.506  Excluding specified files from build: 

06:00:27.506     excluding: assets/iOS Assets

06:00:27.506     excluding: archive/*.*

06:00:27.506     excluding: stores/*.*

06:00:27.506     excluding: captures/*.png

06:00:27.506     excluding: captures/*.jpg

06:00:27.506     excluding: icons/*.xcf

06:00:27.506     excluding: build/*.*

06:00:27.506     excluding: docs/*.xlsx

06:00:27.506     excluding: docs/*.doc

06:00:27.506     excluding: docs/*.pdf

06:00:27.506     excluding: assets/*.xcf

06:00:27.506     excluding: assets/*.svg

06:00:28.308  WebServices: Call: corona.build.7 

06:01:35.637  WebServices: Response received in 67 seconds

06:01:35.637  BuildID: 5a27dbdd8e35b

06:01:35.637  WebServices: Call: corona.getUrl 

06:01:36.193  WebServices: Response received in 1 seconds

06:01:36.193  WebServices: downloading build

06:01:39.009  WebServices: Download of 6695447 bytes complete in 2 seconds (3.19MB/s)

06:01:45.950  Android build failed (1) after 78 seconds

06:01:45.950  WebServices: Call: user.logout 

06:01:46.427  WebServices: Response received in 1 seconds

Can I get you to follow my instructions in this post?

https://forums.coronalabs.com/topic/71032-build-fail-with-no-clear-reason/

There are two keys that you can set:  debugWebServices and debugBuildProcess

Maybe there will be something more useful in the logs.  

Rob

Rob, 

The above result is with debugWebServices = 1 and debugBuildProcess = 1.  When i set debugBuildProcess = 2, the system crashes in the middle of the build with the following.

11:46:46.262  Testing credentials for ‘C:\Users\alber\keystores\release.keystore’: 

11:46:47.248  jar signed.

11:46:47.248  Picked up JAVA_TOOL_OPTIONS: -Duser.language=en

11:46:47.248  WebServices: Call: system.connect 

11:46:47.917  WebServices: Response received in 0 seconds

11:46:47.917  WebServices: Call: corona.getTime 

11:46:48.349  WebServices: Response received in 1 seconds

11:46:48.349  WebServices: Call: user.login2 

11:46:48.966  WebServices: Response received in 0 seconds

11:46:48.966  Using custom build id from app bundle: 00000 (AppSettings.lua)

11:46:48.966  

11:46:48.966  Using custom Build Id 00000

11:46:48.966  Prepackage: Compiling Lua …

11:46:48.996  Excluding specified files from build: 

11:46:48.996     excluding: assets/iOS Assets

11:46:48.996     excluding: archive/*.*

11:46:48.996     excluding: stores/*.*

11:46:48.996     excluding: captures/*.png

11:46:48.996     excluding: captures/*.jpg

11:46:48.996     excluding: icons/*.xcf

11:46:48.996     excluding: build/*.*

11:46:48.996     excluding: docs/*.xlsx

11:46:48.996     excluding: docs/*.doc

11:46:48.996     excluding: docs/*.pdf

11:46:48.996     excluding: assets/*.xcf

11:46:48.996     excluding: assets/*.svg

11:46:49.550  Prepackage: Building server data file

11:46:49.550  Prepackage: running: “C:\Program Files\Java\jdk1.8.0_151\bin\java.exe” -Djava.class.path=“C:\Program Files (x86)\Corona Labs\Corona\Resources/ant.jar;C:\Program Files (x86)\Corona Labs\Corona\Resources/ant-launcher.jar;C:\Program Files (x86)\Corona Labs\Corona\Resources/AntLiveManifest.jar” org.apache.tools.ant.launch.Launcher -v -DTEMP_DIR=“C:\Users\alber\AppData\Local\Temp\Corona Labs\CLtmpa07540” -DSRC_DIR=“C:\Users\alber\OneDrive\Developments\meadowbrook\mobile” -DBUNDLE_DIR=“C:\Program Files (x86)\Corona Labs\Corona\Resources” -DLIVE_BUILD=NO -DLIVE_BUILD_MANIFEST_FILE= -f “C:\Program Files (x86)\Corona Labs\Corona\Resources”/build.xml build-input-zip

Rob,

I copied the HelloWorld project to my designs folder and attempted to build it (to try to reduce the number of variables).  I set debugWebServices=3, debugBuildProcess=1.  (it also crashes if debugBuildProcess=2).

11:56:35.001  Copyright © 2009-2017  C o r o n a   L a b s   I n c .

11:56:35.001  Version: 3.0.0

11:56:35.001  Build: 2017.3183

11:56:35.001  Platform: SM-G900S / x64 / 10.0 / Intel® HD Graphics 520 / 4.4.0 - Build 20.19.15.4444 / 2017.3183 / en_US | US | en_US | en

11:56:35.001  Loading project from:   C:\Users\alber\designs\corona\HelloWorld

11:56:35.001  Project sandbox folder: C:\Users\alber\AppData\Local\Corona Labs\Corona Simulator\Sandbox\helloworld-14563435B19EECB3397EEC090280AB58\Documents

11:56:53.648  Testing credentials for ‘C:\Users\alber\keystores\release.keystore’: 

11:56:54.381  jar signed.

11:56:54.381  Picked up JAVA_TOOL_OPTIONS: -Duser.language=en

11:56:54.397  WebServices: Call: system.connect (no params)

11:56:54.835  WebServices: Response received in 0 seconds: <?xml version=“1.0”?>

11:56:54.835  <methodCall><methodName>system.connect</methodName>

11:56:54.835  <params><param><value><struct><member><name>sessid</name><value>27fa0931e4a4c83c2081b81f8c4529dd</value></member><member><name>user</name><value><struct><member><name>cache</name><value><i4>0</i4></value></member><member><name>hostname</name><value>88.99.238.58</value></member><member><name>roles</name><value><struct><member><name>1</name><value>anonymous user</value></member></struct></value>

11:56:54.835  </member><member><name>session</name><value><string/></value></member><member><name>uid</name><value><i4>0</i4></value></member><member><name>user_role_tokens</name><value>Corona SDK Starter</value></member><member><name>user_role_tokens_id</name><value>1</value></member></struct></value>

11:56:54.835  </member></struct></value>

11:56:54.835  </param>

11:56:54.835  </params></methodCall>

11:56:54.835  WebServices: Call: corona.getTime (no params)

11:56:55.282  WebServices: Response received in 1 seconds: <?xml version=“1.0”?>

11:56:55.282  <methodCall><methodName>corona.getTime</methodName>

11:56:55.282  <params><param><value><struct><member><name>timestamp</name><value>1512583015</value></member></struct></value>

11:56:55.282  </param>

11:56:55.282  </params></methodCall>

11:56:55.282  WebServices: Call: user.login2 

11:56:55.282             params:  {

11:56:55.282      “hash” = “927292aa6223f0c65840943b8829d5ce4ca176935e9699e8d2161ee8a952f946”

11:56:55.282      “domain_name” = “developer.anscamobile.com

11:56:55.282      “domain_time_stamp” = “1512583015”

11:56:55.282      “nonce” = “ieQvcKqwLQ”

11:56:55.282      “sessid” = “27fa0931e4a4c83c2081b81f8c4529dd”

11:56:55.282      “username” = “albert.l.garrett@gmail.com

11:56:55.282      “encryptedPassword” = “6cda2debdecbd0ef51858470305e34553b91745cd9f5e36ab81dcf21c2110eb7c7254fd3ef1d69cee714e92d553ca6e8078c50ed6e87645a54e91a0e4fe2c7c3a54437e6b6c4aef5d2f895117356a11f3ca31173da46821c17121ddd880691823d5eefd2c6935ddba8e5e69b9ee5bd0e2e95ebad200874e63f96c8940d8939480b68bc657dff8776d08f02095bdd1debbf2476cb03e514aa948f9d53cbbfe74b9f3a0bb75b0df36e2abf642ac02b8e874f1fd68f280f0f4257b210563e170602b46796e6e9ec47ba79ee0893660f80eef6cc28cf05c0dd6bf5915ab968abedf84d04872344571bc1e6ddbe686823655dee6a357e23b9406132145da25cf62a0e”

11:56:55.282      “timestamp” = “5a25e180”

11:56:55.282  }

11:56:55.900  WebServices: Response received in 0 seconds: <2821 bytes of data elided>

11:56:55.900  Using custom build id from app bundle: 00000 (AppSettings.lua)

11:56:55.900  

11:56:55.900  Using custom Build Id 00000

11:56:55.900  Prepackage: Compiling Lua …

11:56:55.921  Prepackage: Building server data file

11:56:56.339  DeviceBuildData: {“isLaunchPadActive”:false,“targetCertType”:“distribution”,“targetPlatformVersion”:140300,“debugBuildProcess”:1,“targetDevice”:0,“dailyBuildRevision”:3183,“buildBucket”:“ansca-templates”,“clientPlatform”:“Win”,“targetAppStore”:“google”,“targetPlatform”:1,“clientDeviceId”:“ffd44295a99f66ee40b82244bb5d5d61”,“plugins”:[],“dailyBuildYear”:2017,“clientProductId”:“basic”,“appName”:“HelloWorld”}

11:56:56.339  WebServices: Call: corona.build.7 

11:56:56.339             params:  {

11:56:56.339      “hash” = “6159c8700ad5a83b5270b162b4cde7f7de5f6a27cac3915e91985e28a45f87a5”

11:56:56.339      “domain_name” = “developer.anscamobile.com

11:56:56.339      “domain_time_stamp” = “1512583016”

11:56:56.339      “nonce” = “YUMoGjXcBN”

11:56:56.339      “sessid” = “712028e7cf30178bd03d860097f039b3”

11:56:56.339      “deviceId” = “ffd44295a99f66ee40b82244bb5d5d61”

11:56:56.339      “timestamp” = “5a25e180”

11:56:56.339      “appname” = “HelloWorld”

11:56:56.339      “file” = <1664 bytes of data elided>

11:56:56.339      “device” = 0

11:56:56.339      “platform” = 1

11:56:56.339      “version” = 140300

11:56:56.339      “appPackage” = “com.gmail.garrett.l.albert.HelloWorld”

11:56:56.339      “customBuildId” = “00000”

11:56:56.339      “productId” = “basic”

11:56:56.339      “clientPlatform” = “Win”

11:56:56.339      “certType” = “distribution”

11:56:56.339      “appVersion” = “1.0.0”

11:56:56.339      “launchPad” = 0

11:56:56.339      “json” = “{“isLaunchPadActive”:false,“targetCertType”:“distribution”,“targetPlatformVersion”:140300,“debugBuildProcess”:1,“targetDevice”:0,“dailyBuildRevision”:3183,“buildBucket”:“ansca-templates”,“clientPlatform”:“Win”,“targetAppStore”:“google”,“targetPlatform”:1,“clientDeviceId”:“ffd44295a99f66ee40b82244bb5d5d61”,“plugins”:[],“dailyBuildYear”:2017,“clientProductId”:“basic”,“appName”:“HelloWorld”}”

11:56:56.339      “downloadResult” = 1

11:56:56.339  }

11:57:15.138  WebServices: Response received in 19 seconds: <?xml version=“1.0”?>

11:57:15.138  <methodCall><methodName>corona.build.7</methodName>

11:57:15.138  <params><param><value>5a282f68ec1cb</value></param>

11:57:15.138  </params></methodCall>

11:57:15.138  BuildID: 5a282f68ec1cb

11:57:15.138  WebServices: Call: corona.getUrl 

11:57:15.138             params:  {

11:57:15.138      “hash” = “2f330b41228b6d788225d3a2e4ce9e9af9fa496333c3d1fa05740be8a9d0bf4b”

11:57:15.138      “domain_name” = “developer.anscamobile.com

11:57:15.138      “domain_time_stamp” = “1512583035”

11:57:15.138      “nonce” = “ToZEwWyvfH”

11:57:15.138      “sessid” = “712028e7cf30178bd03d860097f039b3”

11:57:15.138      “buildsessionid” = “5a282f68ec1cb”

11:57:15.138  }

11:57:15.623  WebServices: Response received in 0 seconds: <?xml version=“1.0”?>

11:57:15.623  <methodCall><methodName>corona.getUrl</methodName>

11:57:15.623  <params><param><value>https://ansca-build-temp.s3.amazonaws.com/5a282f68ec1cb-built.zip?AWSAccessKeyId=AKIAIMSD7JG23DSGPRIA&Expires=1512583065&Signature=0frtKWGri4OSBHyaAiPFZq%2Fnft4%3D</value></param>

11:57:15.623  </params></methodCall>

11:57:15.623  WebServices: download request: https://ansca-build-temp.s3.amazonaws.com/5a282f68ec1cb-built.zip?AWSAccessKeyId=AKIAIMSD7JG23DSGPRIA&Expires=1512583065&Signature=0frtKWGri4OSBHyaAiPFZq%2Fnft4%3D

11:57:15.623  WebServices:          to file: C:\Users\alber\AppData\Local\Temp\Corona Labs\CLtmpa13812\output.zip

11:57:15.807  WebServices: downloading 3709123 bytes

11:57:17.161  WebServices: Download of 3709123 bytes complete in 2 seconds (1.77MB/s)

11:57:20.584  Android build failed (1) after 25 seconds

11:57:20.584  WebServices: Call: user.logout 

11:57:20.584             params:  {

11:57:20.584      “hash” = “3af8039d35eff5469708293273be3e777b2a30ce26dc35d8fee1db2e68dda301”

11:57:20.584      “domain_name” = “developer.anscamobile.com

11:57:20.584      “domain_time_stamp” = “1512583040”

11:57:20.584      “nonce” = “ZjpIIaACiP”

11:57:20.584      “sessid” = “712028e7cf30178bd03d860097f039b3”

11:57:20.584  }

11:57:21.047  WebServices: Response received in 1 seconds: <?xml version=“1.0”?>

11:57:21.047  <methodCall><methodName>user.logout</methodName>

11:57:21.047  <params><param><value><boolean>1</boolean></value></param>

11:57:21.047  </params></methodCall>

I think this points to a possible cause:

Prepackage: running: "C:\Program Files\Java\jdk1.8.0\_151\bin\java.exe"

Corona needs the 32bit Java JDK.  I would expect this to be located in:

Prepackage: running: "C:\Program Files (x86)\Java\jdk1.8.0\_151\bin\java.exe"

This appears you are using the 64-bit version. Please install the version from this thread:

https://forums.coronalabs.com/topic/71066-android-build-failed/#entry371522

Rob

I couldn’t get Corona Build 3183 to locate the correct JDK.  I uninstalled both corona and JDK and started from scratch with Public Build 3135 and JDK1.8.0_152.  After setting ENV Vars for JAVA_HOME, JRE_HOME (don’t know if needed) and adding %JAVA_HOME%\bin to path, Public Build 3135 could build a release version of the project.  I then upgraded Corona to DailyBuild 3183.  At that point, Corona indicates that it cannot find JDK.  Any ideas there?

You should not need to alter any environment variables. I also would just install the latest daily build, after you install this specific version:

jdk-8u152-windows-i586.exe

It must be the one that says i586.exe in the file name.

Rob

I’m having the same problem.

Microsoft Windows [Version 10.0.16299.98] 64-bit

Corona build 2017.3184

Java jdk-8u152-windows-i586.exe

debugBuildProcess=3

debugWebServices=3

When I select Build -> Android…, it does not come up with Build dialog but comes up with a prompt box saying:

Could not find the Java Development Kit (JDK).  This is

required to build for Android.

Would you like to download it now?

So it looks like it needs the 64bit version to even show the build dialog.  Should I do that or is there another fix?

Can you try and install the latest 64 bit Java and use with Corona build 3184?

Rob

I now get Android build failed (1). 

The last part of the log is:

9:36:38.805  WebServices: download request: https://ansca-build-temp.s3.amazonaws.com/5a34242e5020c-built.zip?AWSAccessKeyId=AKIAIMSD7JG23DSGPRIA&Expires=1513366635&Signature=LGo0AX1ISkHV0FzTv%2BvPJZEN2hk%3D

19:36:38.805  WebServices:          to file: C:\Users\dwc\AppData\Local\Temp\Corona Labs\CLtmpa06656\output.zip

19:36:39.414  WebServices: downloading 3710793 bytes

19:36:47.134  WebServices: Download of 3710793 bytes complete in 9 seconds (0.39MB/s)

19:36:47.134  Build: running: “C:\Program Files\Java\jdk1.8.0_152\bin\java.exe” -Djava.class.path=“C:\Program Files (x86)\Corona Labs\Corona SDK\Resources/ant.jar;C:\Program Files (x86)\Corona Labs\Corona SDK\Resources/ant-launcher.jar” org.apache.tools.ant.launch.Launcher -v -DTEMP_DIR=“C:\Users\dwc\AppData\Local\Temp\Corona Labs\CLtmpa06656” -DSRC_DIR=“D:\Dev\Corona\test” -DDST_DIR=“D:\Dev\Corona” -DUSER_APP_NAME=“test” -DBUNDLE_DIR=“C:\Program Files (x86)\Corona Labs\Corona SDK\Resources” -DLIVE_BUILD=NO -DLIVE_BUILD_ASSET_DIR= -DKS=“D:\Dev\Corona\ireadold.jks” -DKP=“XXXXXX” -DKA=“keyguitar” -DAP=“XXXXXX” -DAV=4.0.3  -f “C:\Program Files (x86)\Corona Labs\Corona SDK\Resources”/build.xml build

19:36:50.653  Android build failed (1) after 44 seconds

19:36:50.653  WebServices: Call: user.logout 

19:36:50.653             params:  {

19:36:50.653      “hash” = “933c83c0807ec5c02219cdd7962af819f62f6d90bdbc2ec6cdabeb3760a12629”

19:36:50.653      “domain_name” = “developer.anscamobile.com

19:36:50.653      “domain_time_stamp” = “1513366616”

19:36:50.653      “nonce” = “ZbZauYOfTN”

19:36:50.653      “sessid” = “81328195fd6c0ac0e6cffeccce90b44c”

19:36:50.653  }

19:36:50.950  WebServices: Response received in 0 seconds: <?xml version=“1.0”?>

19:36:50.950  <methodCall><methodName>user.logout</methodName>

19:36:50.950  <params><param><value><boolean>1</boolean></value></param>

19:36:50.950  </params></methodCall>

I downgraded to 3163 and had no issues with the JDK.  3183 was not working for me.  I haven’t tried 3184 with the 64-bit JDK.

Hello, has anyone found a solution for this issue?

I am currently unable to compile my Android Applications on both Mac and Windows with recent releases of Corona.

I’ve even tried using the newest stable (3184) but I always get the cryptic Error code #1 message.

Similarly to the devs above, with a debug key my apps and the hello world apps compile but with my keychain (which I have been using for the past 5 years for some apps).

Enabling level 2 or 3 logs from webservice and debug crash Corona.

Stable 3184 wont even recognize older versions of the JDK prior to the JDK9 so I assume reverting it to a previous version is not a solution.

Given that this is the holiday season, it is critical for my apps to be updated, even more so considering the Jan. 15th deadline to solve the openFile implementation issue.

#SendHelp

I managed to build using 3184 and jdk9.  It looks like you have to upgrade your keystore using the following

keytool -importkeystore -srckeystore mystore.keystore -destkeystore newstore.keystore -deststoretype pkcs12 -srcstorepass storepass -deststorepass storepass -srckeypass keypass -destkeypass storepass -srcalias keyalias

Note that the destkeypass should be the same as the storepass i.e. don’t use the original keypass

Also my “Save in folder” path ended with a “” and I had to take that out

Hi @atlantisdwc thank you for posting this. im having trouble understanding exactly how to upgrade the keystore. if lets say i created the keystore like this prevously with this keystore name and alias, what in your key signing upgrade would need to be changed? is what im doing below correct (Please see parts in bold)? if anyone can confirm or help?

Original created keystore some years ago:
keytool -genkey -v -keystore gamenameA.keystore -alias mykeyalias -keyalg RSA -keysize 2048 -validity 99999

So to upgrade keystore:would this be correct?
keytool -importkeystore -srckeystore gamenameA.keystore -destkeystore gamenameB.keystore -deststoretype pkcs12 -srcstorepass storepass -deststorepass storepass -srckeypass keypass -destkeypass storepass -srcalias mykeyalias

 

That would seem to be correct.

Yes that looks correct.  It basically upgrades the keystore to pkcs12 format.  My old file was .jks format.

Had the problem on 3188. Changing the keystore did not help me. But the build.xml change did solve my problem.

From here :

https://forums.coronalabs.com/topic/71138-build-fail-without-error-code/page-2

We recommend using 3184 until we can resolve the issue.

Rob

Can I get you to follow my instructions in this post?

https://forums.coronalabs.com/topic/71032-build-fail-with-no-clear-reason/

There are two keys that you can set:  debugWebServices and debugBuildProcess

Maybe there will be something more useful in the logs.  

Rob

Rob, 

The above result is with debugWebServices = 1 and debugBuildProcess = 1.  When i set debugBuildProcess = 2, the system crashes in the middle of the build with the following.

11:46:46.262  Testing credentials for ‘C:\Users\alber\keystores\release.keystore’: 

11:46:47.248  jar signed.

11:46:47.248  Picked up JAVA_TOOL_OPTIONS: -Duser.language=en

11:46:47.248  WebServices: Call: system.connect 

11:46:47.917  WebServices: Response received in 0 seconds

11:46:47.917  WebServices: Call: corona.getTime 

11:46:48.349  WebServices: Response received in 1 seconds

11:46:48.349  WebServices: Call: user.login2 

11:46:48.966  WebServices: Response received in 0 seconds

11:46:48.966  Using custom build id from app bundle: 00000 (AppSettings.lua)

11:46:48.966  

11:46:48.966  Using custom Build Id 00000

11:46:48.966  Prepackage: Compiling Lua …

11:46:48.996  Excluding specified files from build: 

11:46:48.996     excluding: assets/iOS Assets

11:46:48.996     excluding: archive/*.*

11:46:48.996     excluding: stores/*.*

11:46:48.996     excluding: captures/*.png

11:46:48.996     excluding: captures/*.jpg

11:46:48.996     excluding: icons/*.xcf

11:46:48.996     excluding: build/*.*

11:46:48.996     excluding: docs/*.xlsx

11:46:48.996     excluding: docs/*.doc

11:46:48.996     excluding: docs/*.pdf

11:46:48.996     excluding: assets/*.xcf

11:46:48.996     excluding: assets/*.svg

11:46:49.550  Prepackage: Building server data file

11:46:49.550  Prepackage: running: “C:\Program Files\Java\jdk1.8.0_151\bin\java.exe” -Djava.class.path=“C:\Program Files (x86)\Corona Labs\Corona\Resources/ant.jar;C:\Program Files (x86)\Corona Labs\Corona\Resources/ant-launcher.jar;C:\Program Files (x86)\Corona Labs\Corona\Resources/AntLiveManifest.jar” org.apache.tools.ant.launch.Launcher -v -DTEMP_DIR=“C:\Users\alber\AppData\Local\Temp\Corona Labs\CLtmpa07540” -DSRC_DIR=“C:\Users\alber\OneDrive\Developments\meadowbrook\mobile” -DBUNDLE_DIR=“C:\Program Files (x86)\Corona Labs\Corona\Resources” -DLIVE_BUILD=NO -DLIVE_BUILD_MANIFEST_FILE= -f “C:\Program Files (x86)\Corona Labs\Corona\Resources”/build.xml build-input-zip