title: How to sign application with existing .cer, .p12 or .pfx certificate?
body: <p>I want to sign Android app with the same certificate used for the desktop app. I have 3 files - .cer, .p12 and .pfx. Is it possible to use any of those for signing Android app?</p>
  
  <p><strong>Update</strong>: I have successfully imported the .cer key (which appears to be X.509-format certificate) into the newly created keystore, but I can't use it for signing. Here's the error message <code>jarsigner</code> gives me:</p>
  
  <blockquote>
    <p>Certificate chain not found for: [alias].  key must reference a valid
    KeyStore key entry containing a private key and corresponding public
    key certificate chain.</p>
  </blockquote>
  
  <p>Perhaps, there's something else I must do with a keystore after importing the certificate to make it valid? Generate a public key or something?</p>