使用相同的密钥库退出我的应用程序失败
大家好,
我使用 Eclipse 创建了一个适用于 android 2.2 的应用程序,并使用我创建的密钥库进行了签名,然后将其上传到市场。
我对应用程序做了一些更改,我已将应用程序版本从 1.0 tp 1.1 更改,然后我尝试签署新生成的 .apk 文件,但出现以下错误:
jarsigner: 无法签署 jar: java.lang. util.zip.ZipException:条目压缩大小无效(预期为 525,但实际为 527 字节)。
当您尝试签署签名的 .apk 文件时,会发生此错误,我已从 Eclipse 生成了未签名的 .apk 并且我的应用程序签名成功。
现在市场拒绝我新签名的应用程序,我猜第一个版本是由 Eclpise 和我的密钥库签名的,现在我不能让两者都签名的新版本。这是真实的分析吗?
我做错了什么?
Salam all,
I've created an app for android 2.2 using Eclipse and I have signed using a keystore that I have created, then I have upload it to the Market.
I have done some changes on the app, I have changed the app version from 1.0 tp 1.1, then I have tried to sign the new generated .apk file but I've got the following error:
jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 525 but got 527 bytes).
This error occurs when you try to sing a signed .apk file, I have generated an unsigned .apk from Eclipse and my app signed successfuly.
Now the Market refuses my new signed app, I guess that the first version was signed by Eclpise and my keystore, now I cannot have a new version signed by both. is this true analysis?
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要在 Eclipse 中获取未签名的 apk,请在 Package Explorer 窗口中右键单击应用程序名称并选择 Android Tools,然后选择“Export Unsigned Application Package...”。将包保存到新位置。
一旦你有一个未签名的 apk。运行您在未签名的 apk 文件上使用的 jarsigner 命令。
注意:如果您看到“CN=Android Debug”,这意味着 .apk 是使用 Android SDK 生成的调试密钥进行签名的。如果您打算发布应用程序,则必须使用您的私钥而不是调试密钥对其进行签名。
来源:
http://forum.xda-developers.com/showthread.php?t=492822
http://developer.android.com/guide/developing/tools/zipalign.html
这解决了我的问题
To get an unsigned apk in Eclipse, right click on application name in the Package Explorer window and choose Android Tools, then choose "Export Unsigned Application Package...". Save the package to a new location.
Once you have an unsigned apk. Run the jarsigner command you were using on the unsigned apk file.
Note: If you see "CN=Android Debug", this means the .apk was signed with the debug key generated by the Android SDK. If you intend to release your application, you must sign it with your private key instead of the debug key.
Source:
http://forum.xda-developers.com/showthread.php?t=492822
http://developer.android.com/guide/developing/tools/zipalign.html
This fixed my issue