sign my app for android

The place to discuss anything and everything about running your LiveCode on Android

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

sign my app for android

Post by fko2 » Thu May 28, 2015 10:21 pm

Hi,

I need a little bit of help! I made my first app for android i also made the standalone.

But i am not able to make the signature. I tried to follow the steps i found in the lessons but it seems to much complicated to me

I have the .apk but i don't know where run the keytool from my mac.
I tried to open the prompt and execute the line was written in the lesson about the keytool ( changing the 'TicTacToe' for the name of my app)
but i had one error as it didn't find the keytool??? How to find the keytool??? I have the "JDK 8 Update 40" installed. My version of LiveCode is 7.0.3

With the keytool it is enough or do i have to make something before or after?
Someone can help me???

Kind regards!

Fko

MaxV
Posts: 1574
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: sign my app for android

Post by MaxV » Fri May 29, 2015 11:44 am

You need to found the keytool executable, did you installed Java JDK?
Create a valid key with Oracle JDK keytool, this is the command on windows:

Code: Select all

keytool.exe -genkey -v -keystore mykey.keystore -alias myalias -keyalg RSA -validity 10000
Keytool will ask you a lot of questions: please note that all answers supplied of the proposed questions by keytool must be different.

Then you have to put where is your keystore file in standalone application settings, and choose sign with my key.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

MaxV
Posts: 1574
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: sign my app for android

Post by MaxV » Fri May 29, 2015 11:50 am

In order to find keytool, open the terminal of your mac and digit:

Code: Select all

cd /

Code: Select all

find -iname  "keytool*"
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5116
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: sign my app for android

Post by jacque » Fri May 29, 2015 7:01 pm

On OS X, keytool is always available, you shouldn't have to locate it. It is part of the default Java installation, which is not included in the OS by default. In OS X (at least, before Yosemite) the first time you try to do anything that uses Java, OS X will ask if you want to download and install Java. If you haven't already, do that. You won't find keytool in Finder. It's probably in one of the restricted folders, but I never bothered to look.

This site tells you how to get and install the Apple version of the JDK if you are running Yosemite: http://www.lowfatgeek.com/mac-os-x/how- ... mite/8545/

After OS X installs the JDK, just launch Terminal and paste in the command and it should work.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

aebki
Posts: 126
Joined: Tue Jan 06, 2015 5:48 pm

Re: sign my app for android

Post by aebki » Sun May 31, 2015 11:28 am

Hi,

Which version of OS X do you have?

fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

Re: sign my app for android

Post by fko2 » Sun May 31, 2015 11:33 am

Hi,

Thanks for your answers!:-)

I installed for the 3rd time "JDK 8 Update 40" in my mac...And as always is written that was successfully installed.
And then in one terminal writing "java -version" i can see that it is installed.

But, that is all.:-(

I can't do nothing else.

I tried to write what MaxV told me but i didn't manage.

So if i write "cd /" nothing is happening.
if i write "find -iname "keytool*" ", i have one error, because of the "-iname"

If i try to search for "keytool" or "keytool.exe" in the finder i don't find nothing.

Is it possible to have the JDK 8 installed but not the keytool.exe?
why the instructions "cd /" and "find -iname "keytool" " are not working in my mac?
someone can test it in one mac and tell me if it is working? Thanks in advance.

One little guide for people (as me) who are not very experienced in this kind of things it will be very appreciated!

The version i have is Yosemite 10.10.2

Regards.
fko

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5116
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: sign my app for android

Post by jacque » Sun May 31, 2015 10:07 pm

On a Mac, you will NOT see the file in Finder. Also, the -iname command doesn't work on Macs, and the ".exe" extension is only for Windows machines.

I searched for information and found that it is possible to have more than one SDK installed. https://java.com/en/download/help/versi ... ml#cmdline Terminal will use the system default Java SDK. Maybe your machine is using an older SDK that is not compatible with Yosemite. You could google for a way to uninstall older versions.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

Re: sign my app for android

Post by fko2 » Mon Jun 01, 2015 8:28 am

Hi Jacque,

Thanks for your answer.

Finally i managed to create the 'release.keystore'.
But then i tried to sign the app creating the standalone as it is explained in the lesson of runrev.

And i have the error it is shown in the image i attached.

How i can resolve it?

Regards,
fko
Attachments
errorKey.png

fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

Re: sign my app for android

Post by fko2 » Mon Jun 01, 2015 3:00 pm

Hi,

Any idea why i have this error and how to solve it?

I tried to make it again and i had it again.
I don't know if it is important or not to know, but before to had this error twice, i had problems creating they key.
In concret i had one 'denied access' when i tried with the 'keytool'...So i moved my '.apk' till the desktop and then 'release.keystore' was successfully created.

Regards,
fko

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: sign my app for android

Post by LCNeil » Mon Jun 01, 2015 3:09 pm

Hi fko,

The following might give you some leads with the error you are receiving-

http://stackoverflow.com/questions/2375 ... play-store

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
-

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5116
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: sign my app for android

Post by jacque » Mon Jun 01, 2015 6:33 pm

Fko, did you choose the location of your keystore file in the Android standalone settings?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

Re: sign my app for android

Post by fko2 » Mon Jun 01, 2015 9:54 pm

Hi,

Thanks to both for your answer...

In the lessons i read that i could do it directly from the standalone settings, so for this i didn't try with jarsigner ( and because i never used it and i thought was easier directly from the standalone settings )

Jacque, what i did is:

1.- First i moved my apk till the desktop to can use the keytool
2.- Then with the 'release.keystore' generated and stored in the desktop i tried to create the standalone. And here i choosed the option "sign with my key" and below i put the path of my 'release.keystore' located in the desktop (even if the folder where i am developping is not in the desktop.)

And during this process, the program asked me if i want to keep this key,and if yes i have to give it one name ( i named it 'KeyAndroid' as it is shown in the image of my other post)

I don't know if i answered your question or not...I hope yes

Regards,
fko

MaxV
Posts: 1574
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: sign my app for android

Post by MaxV » Wed Jun 03, 2015 12:53 pm

fko2 wrote: 1.- First i moved my apk till the desktop to can use the keytool
No, this is not necessary. When you generate the APK, Livecode sign it.
fko2 wrote: And during this process, the program asked me if i want to keep this key...
No, livecode doesn't ask you to keep a key, it just ask you which key inside the key store and the password of that particular key.
A keystore file may contains many keys.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

fko2
Posts: 78
Joined: Sat Feb 07, 2015 12:58 pm

Re: sign my app for android

Post by fko2 » Mon Jun 08, 2015 9:27 pm

Hi MaxV,

Thanks for your answer.

Finally i managed to make it work!

regards,
fko

Post Reply

Return to “Android Deployment”