Xamarin APK签名问题

时间:2018-01-03 17:01:55

标签: c# android xamarin mono visual-studio-2017

即使我选中了“使用以下密钥库详细信息签署.APK文件”,并指定了密钥库的绝对路径,我也会在构建输出中得到这个(必须切换到诊断)

Executing: C:\Program Files\Java\jdk1.8.0_152\bin\jarsigner.exe -keystore "C:\Users\user\AppData\Local\Xamarin\Mono for Android\debug.keystore" -storepass android -keypass android -digestalg SHA1 -sigalg md5withRSA -signedjar "C:\Users\user\AppData\Local\Temp\dpabsfke.ueg\unaligned.jar" "C:\Users\user\AppData\Local\Temp\dpabsfke.ueg\unsigned.apk" androiddebugkey

会导致以下错误

jarsigner error: java.lang.RuntimeException: keystore load: C:\Users\user\AppData\Local\Xamarin\Mono for Android\debug.keystore (The system cannot find the file specified)

当然,由于该位置不存在debug.keystore,因此取消选中“签署.APK文件...”也会导致调试签名失败。

还有其他人遇到过这个问题吗?我想解决这个问题而无需手动签署我的APK。

1 个答案:

答案 0 :(得分:1)

我相信您遇到了以下错误:

https://bugzilla.xamarin.com/show_bug.cgi?id=61065

这应该通过以下拉取请求来修复:

https://github.com/xamarin/xamarin-android/pull/1148

与此同时,您需要确保在本地生成debug.keystore。我有一个答案,可以帮助在该领域:

Lost my debug.keystore due to Xamarin new installation. Can i recover it?