Signing a CocoonJS .apk file errors

Get help using Construct 2

Post » Wed Oct 24, 2012 7:41 am

Hello, now i have the error :
jarsigner: unable to recover key from keystore

How to avoid it?
Webmaster of the French community from Construct Classic and Construct 2
B
80
S
13
G
8
Posts: 27
Reputation: 7,710

Post » Fri Oct 26, 2012 5:21 am


Noup. I tried making a hole new key certificate, I deleted the project from cocoonJS cloud compilation and started again with a new name.
I also changed the name and description in C2 project.
I re-exported, built everything again and Signed with the new key again as a hole new app.
The process goes through as expected. I end up with a signed and "zipaligned" Apk file.
But it wont install on the phone. It just says "the application did not install".

And the "Debug-signed" that cocoonjs provides, still works on the phone.

Im running out of ideas. Did someone got through something like this?.

Thanks!!
B
11
S
1
G
2
Posts: 57
Reputation: 1,690

Post » Fri Oct 26, 2012 6:35 am

uninstall all versions of your app on the phone. Get a dedicated app uninstaller if you need to from google play like Super App Installer Pro.

The signed apk won't install if there's already another apk of the app in your phone.

Also, cocoon doesn't like android v2.2. Will work with 2.3 and up.
B
31
S
6
G
4
Posts: 160
Reputation: 5,998

Post » Fri Oct 26, 2012 2:46 pm

Yes, I already tried all of this. I even change the hole project name and builds. I generated a new key and re-sign the new apk so it will count as a hole new app. But with same results.
self-signed - wont install
cocoon-debug-signed - works.

B
11
S
1
G
2
Posts: 57
Reputation: 1,690

Post » Sat Oct 27, 2012 1:39 pm

Thanks for the tutorial! I had to play around with it a bit but eventual got it ;) some tip that helped me:
I put the echo% JAVA_HOME% under the Java prompt you get by holding shift and right clicking to get the path.

Set the JAVA_HOME in windows by right clicking My Computer> Properties > Advanced System Settings > Environmental Variables Once there add a new System Variable (JAVA_Home) and put the path you got from using echo% JAVA_HOME% as the Variable Value.

If your using PhoneGap it will ask you for your Alias when signing APK its the last YOURAPPNAME in the code below
- jarsigner -verbose -keystore C:\Android\YOURAPPNAME.keystore C:\Android\YOURAPPNAME_release.apk YOURAPPNAME

Hope this helps someone save some time.
B
5
Posts: 2
Reputation: 516

Post » Sat Oct 27, 2012 4:20 pm

I finally made it work. Someone in Ludei forums told me that version 7 of JAVA SDK wasnt properly working with Android. And I was making the signing with the 7u9 version.
I uninstalled it and go back to the version 6. And the final APK signed worked great on my device.
Later on a few other people wrote on the post telling that they were having the same problem and this solved it. So I post this here too to take this into account.
Thanks!
B
11
S
1
G
2
Posts: 57
Reputation: 1,690

Post » Sat Oct 27, 2012 11:01 pm

Thank you thank you thank you all! It works! I also uninstalled java 7 and reinstalled java 6 and everything works perfectly! Thank you for writing this tutorial!

I have another question, can I post this tutorial on the forum of the French Community of construction? I quote this post as a source of course.

Thank you!! squale2012-10-27 23:13:49
Webmaster of the French community from Construct Classic and Construct 2
B
80
S
13
G
8
Posts: 27
Reputation: 7,710

Post » Mon Mar 11, 2013 6:46 pm

Great tutorial all works great :)
But it's true that you must have Java 6 insalled :/
Dont know why :P
Free 20GB of storage - Use This Link
You must signup and install the software to receive additional 5GB
B
52
S
7
G
7
Posts: 23
Reputation: 6,580

Post » Sun Apr 07, 2013 11:01 am

Do we need to uninstall java 7 or just install java 6? I just tried with java 7 and faced with the same problem. :(
B
10
S
4
G
2
Posts: 36
Reputation: 2,207

Post » Tue Apr 23, 2013 5:18 pm

thanks a lot it took me 2 days to look and understand and you just made it realy simple with this tutorial in 5 mins got it done. thanks again
B
9
S
3
G
3
Posts: 25
Reputation: 2,393

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Artpunk, Bad Wolf, cesisco, davides, NRABrazil, Vallar, WhosWho and 27 guests