title: Robolectric gives java.security.KeyStoreException: AndroidKeyStore not found
body: <p>So I wrote my application where I am using <code>KeyStore</code> to encrypt/decrypt data.
  I also wrote a nice Robolectric test for it, but when I am trying to run the test I got the following exception:</p>
  
  <pre><code>java.security.KeyStoreException: AndroidKeyStore not found
  </code></pre>
  
  <p>for the following code:</p>
  
  <pre><code>keyStoreInstance = KeyStore.getInstance("AndroidKeyStore");
  </code></pre>
  
  <p>Any solution for this?</p>
  
  <p>All I found was this:
  <a href="https://github.com/robolectric/robolectric/issues/1518" rel="nofollow noreferrer">https://github.com/robolectric/robolectric/issues/1518</a></p>