我通过apportable制作了apk并尝试将apk上传到Android市场。
起初我上传apk时说
Upload failed
You uploaded an APK with invalid or missing signing information for some of its files. You need to create a valid signed APK. Learn more about signing.
没关系。我应该签署apk,所以我签了名并上传了
jarsigner -keystore android.keystore -verbose myApk.apk myalias
然后市场显示此错误。
Upload failed
You uploaded an APK that is not zip aligned. You will need to run a zip align tool on your APK and upload it again.
那也没问题。我必须拉链apk。
zipalign -f 4 myApk.apk myAlignedApk.apk
现在我再次上传,但第一次错误(丢失签名)再次发生!!
我想我应该签名 - > zipaligning
此程序是正确的。
如何修复或解决此问题?
谢谢你
我可以深入调查这个问题。
签名不是zipaligning
有问题正常签名或使用-digestalg SHA1
$ jarsigner -keystore android.keystore -verbose myApk.apk myAlias
或
$ jarsigner -keystore android.keystore -digestalg SHA1 -verbose myApk.apk myAlias
显示错误
$ jarsigner -verify animalparade-release.apk
jarsigner: java.lang.SecurityException: invalid SHA1 signature file digest for assets/se_maoudamashii_magical24.caf
然而,像这样签名,
$ jarsigner -keystore android.keystore -sigalg SHA1withRSA -digestalg SHA1 -verbose myApk.apk myAlias
市场显示错误如
Upload failed
Your APK has been signed with multiple certificates. Please only sign it with one certificate and upload it again.
Upload another APK
答案 0 :(得分:1)
Whitebear尝试将您的SDK构建工具从ask manager更新到版本20或最新版本并再次创建签名的apk并尝试。
希望它有效。
答案 1 :(得分:1)
最近我更新到Android Studio 2.2并开始面对这个问题。 解: 删除生成的签名APK并再次尝试生成。错误消失了!
答案 2 :(得分:0)
jarsigner -keystore KeystoreName -storepass KeystorePasword -keypass KeystorePassword ExportedUnsignedApkName.apk KeystoreAlias
示例:
jarsigner -keystore MyCustomKeystore -storepass 123456 -keypass 123456 MyUnsign.apk mycustomkeystore
./ zipalign -v 4 Unsignapkname.apk Signedapkname.apk
示例:
./ zipalign -v 4 MyUnsign.apk MySign.apk
答案 3 :(得分:0)
这项工作对我来说: http://developer.android.com/tools/building/building-cmdline.html#AutoReleaseMode
要指定密钥库和别名,请打开项目ant.properties<> file(在项目目录的根目录中找到)并添加key.store和key.alias的条目。例如:
key.store =路径/到/ my.keystore key.alias = mykeystore
蚂蚁释放
它会提示您输入密钥库和别名
的passphase