Android - 使用 jarsigner 签署我的 apk 时出错 [英] Android - Error signing my apk wit jarsigner

查看:35
本文介绍了Android - 使用 jarsigner 签署我的 apk 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个这样的密钥文件:

I made a key file like this:

C:\Users\Alex>keytool -genkey -v -keystore alexkey.keystore -alias alexkey -keyalg RSA -keysize 2048 -validity 10000

然后我尝试用它来签署我的 .apk 文件:

and then I tried to sign my .apk file with it like this:

C:\>jarsigner -verbose -keystore alexkey.keystore problemio.apk alexkey

我通过在 Eclipse 中右键单击项目名称保存了 .apk 文件 --> Android 工具 --> 导出未签名的应用程序包.

and I saved the .apk file by right-clicking the project name in Eclipse --> Android tools --> Export unsigned application package.

然后我将 .apk 文件放在与密钥相同的目录中,并从同一个目录运行 jarsigner 命令.

and then I put the .apk file in the same dir as the key, and ran the jarsigner command from that same dir.

知道为什么我会收到这个错误:

Any idea why I got this error:

jarsigner: unable to create: problemio.apk.sig

谢谢!

推荐答案

感谢@yorkw 的回答,这个问题的真正解决方案是文件夹权限问题.确保您在可以修改的文件夹中操作.我只是通过确保我位于具有正确权限的文件夹中来为自己解决了同样的问题.

Credit to @yorkw for the answer, the real solution to this problem is a folder permissions issue. Make sure you are operating in a folder that you can modify. I just fixed that same problem for my self by making sure I was in a folder with the right permissions.

这篇关于Android - 使用 jarsigner 签署我的 apk 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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