so I have my Xamarin.Android project which contains several libraries. When I try to build I receive an error which says \"java.exe\" exited with code 2.
The solution in my case was to disable the "Sign the .APK file using the following keystore details". Because the keystore location and/or password was incorrect, java.exe exited with code 2.