5
votes

I am attempting to build and deploy a debug version of my Xamarin Android application to an Android emulator. However I get the following error when trying to run the app in the emulator:

"C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error MSB6006: "jarsigner.exe" exited with code 1. (MSB6006) (TestApp)

The strange detail is that I was able to build and deploy the same app with no issues yesterday. This error only appeared today. There have been no code changes in the project - so a code change has not caused the problem.

I would appreciate any help from the SO community.

8

8 Answers

7
votes

This is an old thread but I'm sure this will help someone else:

I've had the same issue while trying to deploy an app using Release mode. I resolved it by performing the following step:

enter image description here

5
votes

In my case the .csproj had incorrect path to the keystore file.

Look for AndroidSigningKeyStore tag in .csproj and correct the path.

3
votes

This error can still happen (even with newest Xamarin Studio), for instance, if path to the keystore that is referenced is not accessible or not existing.

Correcting the path to the keystore file resolved the error for me.

2
votes

This problem may be related with some troubles with Java SDK. You should try to update JDK. When you did it, necessarily checkin Xamarin Studio settings, that one used the latest installed JDK. In some versions of XStudio just changed settings may be reset after accepting. When I solved this issue, I had to remove old JDKs.

1
votes

May be this might not fit to peeps out there, but i faced the same issue in debug mode, after i install windows and start project with latest VS 2017 enterprise.
my java version x64 - C:\Program Files\Java\jdk1.8.0_152
xamarin - Xamarin.Forms.2.4.0.38779
Error was same as this but saying java can not find debug keystore in AppData\Local\Xamarin\Mono to deploy and debug app. After looking all over i just built app in release mode and it ran successfully, then ran it in debug mode, all went well !!!
Previously there was no Mono folder in AppData\Local\Xamarin, now its there.
Still have no idea what is this about !!!

0
votes

For those out there with this issue, I have found the solution: upgrade to the latest version of the Xamarin Studio product. This solved my problem.

0
votes

In my case I had the wrong alias name. Somehow the alias was in lower case while the Keystore Name contained uppercases.

0
votes

Same Issue reside in Visual Studio 2019. What worked for me was to create and assign new key store. Cheers!