您上传了一个在调试模式下签名的 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(您上传了一个在调试模式下签名的 APK.You need to sign your APK in release mode error)
本文介绍了您上传了一个在调试模式下签名的 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)