开发者

How do you sign a mono for android application

I am attempting to add google map functionality to my mono for android application by following these instructions.

I have created a public.keystore and I am trying to use this keystore to sign the application by following these instructions, which I do not find explicit enough.

1) I gather I must add the following block into the csproj file. Is this correct?

<Prope开发者_如何学PythonrtyGroup>  
    <AndroidKeyStore>True</AndroidKeyStore>  
    <AndroidSigningKeyStore>public.keystore</AndroidSigningKeyStore>  
    <AndroidSigningStorePass>public</AndroidSigningStorePass>  
    <AndroidSigningKeyAlias>public</AndroidSigningKeyAlias>  
    <AndroidSigningKeyPass>public</AndroidSigningKeyPass>  
</PropertyGroup>

2) What is the correct location of the public.keystore file?


I completely failed to register that there was full sample solution, as part of the instructions I was trying to follow that, that answered my questions.

I am a giddy goat.


1) You should, but I don't know if you must. If you do then you may need to change some of the values.

Consider a keystore that is created by the command:

keytool.exe -genkey -v -alias public -keyalg RSA -keysize 2048 -validity 10000 -keystore public.keystore

Then:

    <AndroidSigningKeyStore>public.keystore</AndroidSigningKeyStore>

Defines the filename of the keystore ie. public.keystore

    <AndroidSigningKeyAlias>public</AndroidSigningKeyAlias>  

Is the alias of the key within the keysotre that you want to use. ie. public

    <AndroidSigningStorePass>public</AndroidSigningStorePass>  

Is the keystore's password. This will be the first password that you were prompted for.

    <AndroidSigningKeyPass>public</AndroidSigningKeyPass>   

Is the key's password. This will be the second password that you were prompted for.

References

http://developer.android.com/guide/publishing/app-signing.html#cert http://android.xamarin.com/Documentation/Build_Process#Signing


2) You can place public.keystore in the root of the project, but you don't have to add it to the solution.

To location of the keystore file is defined by the following element from Question 1:

<AndroidSigningKeyStore>public.keystore</AndroidSigningKeyStore>


I am using command file to sign the package.

"C:\Program Files\Java\jdk1.6.0_25\bin\jarsigner.exe" -verbose -keystore key.keystore myapplication.apk keyalias

"C:\Program Files\Android\android-sdk\tools\zipalign.exe" -v 4 myapplication.apk myapplication-Signed.apk

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜