如何在xamarin.android中创建新的密钥库? [英] How to create a new keystore in xamarin.android?

查看:78
本文介绍了如何在xamarin.android中创建新的密钥库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试发布xamarin.android应用.我正在将Visual Studio与Xamarin Android 6配合使用,因此我遵循了

我不知道该命令应该放在哪里.我查看了那个keytool链接,但找不到任何东西.我尝试了cmd,VS2015的MSBuild命令提示符和VS2015的开发者命令提示符,但是所有这些都显示了此错误:'$'不被识别为内部或外部命令,可操作程序或批处理文件.

此外,我尝试使用Visual Studio创建一个新的密钥库.我去了工具> Android>发布Android应用程序,我创建了一个密钥库,它出现在我指定的路径.然后,我回到该指南并继续签署APK.但是没有任何带有我指定的名称和路径的.apk.在执行所有这些操作之前,只有3个.apk无效.

现在我的问题是我应该在哪里使用该命令?此外,我想知道还有其他方法可以发布xamarin.android应用吗?

解决方案

Reyhaneh,

Keytool 是由以下人员提供的可执行文件:Java SDK.您可以在Java SDK文件夹中找到它,例如:

 <代码> C:\ Program Files(x86)\ Java \ jdk1.7.0_55 \ bin \ keytool.exe 

您可以在常规命令提示符下执行它.要创建新的密钥库,请在以下行中打开命令提示符:

 "C:\ Program Files(x86)\ Java \ jdk1.7.0_55 \ bin \ keytool.exe" -genkeypair -v -keystore< filename> .keystore -alias< key-name>-keyalg RSA -keysize 2048-有效性10000 

I'm trying to publish a xamarin.android app. I'm using Visual Studio with Xamarin Android 6, so I followed this. In part 2, it describes how to create a new keystore as shown in the following screenshot (You can see the complete describtion here):

I don't get where should I place this command. I looked at that keytool link, but couldn't find any thing. I tried cmd, MSBuild Command Prompt for VS2015 and Developer Command Prompt for VS2015, but all of them showed this error: '$' is not recognized as an internal or external command, operable program or batch file.

In addition to, I tried to create a new keystore using Visual Studio. I went to tools>Android>Publish Android App and I created a keystore and it appeared in path that I specified. Then I went back to that guide and continued from Sign the APK. But there's not any .apk with name and path that I specified. There are just 3 .apk that were before doing all this and don't work.

Now my question is that where should I use that command? In furthermore, I would like to know is there any other way to publish an xamarin.android app?

解决方案

Reyhaneh,

Keytool is an executable provided by the Java SDK. You'll find it in your Java SDK folder, for example:

C:\Program Files (x86)\Java\jdk1.7.0_55\bin\keytool.exe

You can execute it in a normal command prompt. To create a new keystore, open a command prompt with the following line:

"C:\Program Files (x86)\Java\jdk1.7.0_55\bin\keytool.exe" -genkeypair -v -keystore <filename>.keystore -alias <key-name> -keyalg RSA -keysize 2048 -validity 10000

这篇关于如何在xamarin.android中创建新的密钥库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆