Page 1 of 1

sign my app for android

Posted: Thu May 28, 2015 10:21 pm
by fko2
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

Re: sign my app for android

Posted: Fri May 29, 2015 11:44 am
by MaxV
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.

Re: sign my app for android

Posted: Fri May 29, 2015 11:50 am
by MaxV
In order to find keytool, open the terminal of your mac and digit:

Code: Select all

cd /

Code: Select all

find -iname  "keytool*"

Re: sign my app for android

Posted: Fri May 29, 2015 7:01 pm
by jacque
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.

Re: sign my app for android

Posted: Sun May 31, 2015 11:28 am
by aebki
Hi,

Which version of OS X do you have?

Re: sign my app for android

Posted: Sun May 31, 2015 11:33 am
by fko2
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

Re: sign my app for android

Posted: Sun May 31, 2015 10:07 pm
by jacque
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.

Re: sign my app for android

Posted: Mon Jun 01, 2015 8:28 am
by fko2
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

Re: sign my app for android

Posted: Mon Jun 01, 2015 3:00 pm
by fko2
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

Re: sign my app for android

Posted: Mon Jun 01, 2015 3:09 pm
by LCNeil
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
-

Re: sign my app for android

Posted: Mon Jun 01, 2015 6:33 pm
by jacque
Fko, did you choose the location of your keystore file in the Android standalone settings?

Re: sign my app for android

Posted: Mon Jun 01, 2015 9:54 pm
by fko2
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

Re: sign my app for android

Posted: Wed Jun 03, 2015 12:53 pm
by MaxV
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.

Re: sign my app for android

Posted: Mon Jun 08, 2015 9:27 pm
by fko2
Hi MaxV,

Thanks for your answer.

Finally i managed to make it work!

regards,
fko