发布的 Android apk 出现错误“包文件未正确签名”
我最近将我的应用程序上传到 Android 市场,但是由于错误,下载时它拒绝运行
包文件未正确签名
我首先使用 eclipse 发布包,右键单击导出,创建密钥库然后发布,但它拒绝工作。
然后我下载了 keytool 和 jarsigner 并使用它们来签署我发布的升级。然而,这给出了同样的错误。
我不知道我做错了什么,并且由于我无法删除该应用程序,所以我无法尝试重新启动,任何人都可以帮助我吗?
谢谢
I recently uploaded my application to the android market however it's refusing to run when downloaded due to the error
Package file was not signed correctly
I first published the packet using eclipse, right click export, creating a keystore then publishing, however it refuses to work.
I then downloaded the keytool and jarsigner and used them to sign an upgrade which I posted instead. However this gives the same error.
I have no idea what I've done wrong, and since I cannot delete the application I cannot try and start again can anyone help me?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
您的设备上很可能仍然安装了调试副本。现在您已经下载了同一应用程序的不同副本,并且导致了此错误。
从您的设备中完全卸载该应用程序。然后再次从市场下载它应该可以工作。
You have your debug copy still installed on your device most likely. Now you have downloaded a different copy of the same app and it's causing this error.
Uninstall the app completely from your device. Then download it from the market again and it should work.
好吧,我也遇到了同样的问题,但所有建议的解决方案都不适合我。我以两年来的方式签署我的应用程序,Android 市场接受它很好,只是用户无法从市场下载它,并出现“包未签名”错误。
结果是我正在开发的另一个项目安装了 JDK7。它成为默认的 JDK,并且出于某种原因,JDK7 的 keytool 以 Android 不喜欢的方式对包进行签名。所以我恢复到 JDK 1.6.0_23 并重新运行我的构建并将其放在市场上,一切都恢复正常。
我希望这对其他人有帮助。
OK I had this same issue and none of the suggested resolutions worked for me. I was signing my app the same way I have been for 2 years and the Android Market was accepting it fine, just users could not download it from the Market with the "Package Not Signed" error.
What it turned out to be was for another project I am working on I had JDK7 installed. It became the default JDK and for some reason the keytool for JDK7 is signing the package in a way that Android must not like. So I reverted to JDK 1.6.0_23 and re-ran my build and put it on the Market and everything went back to normal.
I hope this helps someone else.
在平板电脑上,请注意,如果您安装应用程序的调试版本,然后正常卸载它(拖到垃圾箱,直到显示“卸载”),这是不够的。由于平板电脑可以供多个用户使用,因此您必须
一直滚动到最底部。在那里,您将看到您的应用程序。点击它,然后点击操作栏中的
菜单
(三个点),然后为所有用户卸载
。然后你就可以出发了。On a tablet, note that if you install a debug version of the app and then uninstall it as normal (dragging to trash until it says "uninstall") that is not enough. Because tablets have the potential for multiple users, you HAVE to go to
and then scroll all the way to the very bottom. There, you will see your app. Tap it, and then hit
Menu
in the action bar (the three dots), and thenuninstall for all users
. Then you'll be good to go.使用 JDK7 签署 APK 时出现问题。您可以通过将其添加到 build.xml
源来解决此问题: KIYUT 开发者博客
There's a problem when signing APKs with JDK7. You can solve it adding this to build.xml
Source: KIYUT Developer Blog
最近,我从命令行签署我的 APK 并收到此错误。我通过此链接中的说明解决了此错误:
http://developer.android。 com/tools/publishing/app-signing.html
Recently, I signed my apks from the command line and got this error. I solved this error through the instructions in this link:
http://developer.android.com/tools/publishing/app-signing.html
发生此错误通常是因为您尝试推送的更新所使用的密钥与初始提交中使用的密钥不同。您需要找到第一次发布应用程序时使用的密钥,并使用它来签署更新。
This error usually occurs because you are trying to push an update which was signed with a different key than you used in the initial submission. You need to find the key you used the first time you published the application and use this to sign the update.
我开发的应用程序也遇到了同样的问题。
转到应用程序管理器,清除应用程序的数据,然后强制停止(如果正在运行)并将其卸载。然后再次尝试从市场安装。这对我有用。
https://market.android.com/details?id=net .trackmelite.GoogleMaps&feature=search_result
I had the same problem with my developed app.
Go to the App Manager, clear the data for the app, then force stop if it's running and uninstall it. Then try again to install from market. This worked for me.
https://market.android.com/details?id=net.trackmelite.GoogleMaps&feature=search_result
我是 Android 新手,但我能够神奇地解决问题:D
我在我的应用程序中使用了 Java 1.7,并使用命令行实用程序 [keytool、jarsinger 和 zipalign] 来签署我的应用程序并得到了相同的错误。
然后我回到 Eclipse 并使用 Android 工具“导出签名应用程序包”以及我最初发布应用程序时使用的相同密钥库;获取该 APK 并使用命令行对其进行压缩对齐。[顺便说一句,必须增加清单中的版本代码]。我取消发布了旧的 APK 并发布了这个新的 APK。执行此操作后,不要立即测试。
不知道你要等多久,但当我检查时,我的已经工作了 4 小时:)
I am new to Android but I was able to resolve the issue magically :D
I used Java 1.7 with my app and used command line utilities [keytool, jarsinger and zipalign] to sign my app and got the same error.
Then I went back to Eclipse and used the Android tool "Export Signed Application Package" with the same keystore I had originally published my app with; took that APK and used the command line to zipalign it.[Had to increment the versioncode in the manifest btw]. I unpublished the old APK and published this new one. Once you do this, do not test it immediately.
Not sure how long you have to wait but mine was working 4 hours later when I checked :)