您上传了一个在调试模式下签名的 APK.You need to sign your APK in release mode error [英] You uploaded an APK that was signed in debug mode. You need to sign your APK in release mode error

查看:14
本文介绍了您上传了一个在调试模式下签名的 APK.You need to sign your APK in release mode error的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Google Play 商店上传应用程序.我正在构建 .apk 并使用 Maven 对其进行签名.我已使用 maven-jarsigner-plugin 对 .apk 文件进行签名.我正在使用我使用 Eclipse 向导创建的密钥来签署另一个 Android 应用程序.我使用以下命令压缩 .apk 文件:zipalign [-f] [-v] infile.apk outfile.apk

I am trying to upload an Application on the Google Play store. I am building the .apk and signing it using Maven. I have used maven-jarsigner-plugin to sign the .apk file. I am using the key that I created using Eclipse wizard for signing another Android app. I zipalign the .apk file using the following command: zipalign [-f] [-v] infile.apk outfile.apk

当我尝试在 Playstore 上上传应用程序时,我收到错误您上传了一个在调试模式下签名的 APK.您需要在发布模式下签署您的 APK.谁能告诉我如何在发布模式下签署apk?我是 Maven 新手(今天开始使用它).谢谢

When I try to uplaod the application on the playstore, I get the error You uploaded an APK that was signed in debug mode. You need to sign your APK in release mode. Can anyone please tell me how to sign the apk in release mode? I am new to Maven (started using it today). Thanks

推荐答案

我不知道你是如何在 Maven 中做到这一点的,但你需要使用发布密钥库编译你的应用程序.您可以使用 keytool 创建一个,它位于您的 Java bin 文件夹中:

I don't know how you do that in Maven, but you need to compile your app with a release keystore. You can create one with keytool, which is available in your Java bin folder:

$ keytool -genkey -v -keystore my-release-key.keystore
-alias alias_name -keyalg RSA -keysize 2048 -validity 10000

创建时,您必须提供两个密码,一个用于密钥库,一个用于密钥.创建密钥库后,您可以使用 Eclipse 导出向导在发布模式下编译您的应用程序.

When creating it, you must supply two passwords, one for the keystore and one for the key. When your keystore is created, you can use the Eclipse Export wizard to compile your app in release mode.

更多详情,请参考http://developer.android.com/tools/publishing/app-signing.html#releasemode

这篇关于您上传了一个在调试模式下签名的 APK.You need to sign your APK in release mode error的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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