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

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

问题描述

我正在尝试发布 xamarin.android 应用.我在 Xamarin Android 6 中使用 Visual Studio,所以我遵循了

我不知道该把这个命令放在哪里.我查看了那个 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 .keystore -alias -keyalg RSA -keysize 2048 -validity 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天全站免登陆