Android 8 - KeyGenerator class generateKey() method crash the application

386 views Asked by At

My app is getting crashed on Android 8 devices while executing the code keyGenerator.generateKey() method. Getting following error like as below.

Fatal Exception: java.lang.RuntimeException Unable to instantiate service com.abc.test.MService: java.security.ProviderException: Keystore operation failed

android.security.keystore.AndroidKeyStoreKeyGeneratorSpi.engineGenerateKey (AndroidKeyStoreKeyGeneratorSpi.java:321) javax.crypto.KeyGenerator.generateKey (KeyGenerator.java:604) Caused by java.security.ProviderException Keystore operation failed

android.security.KeyStore.getKeyStoreException (KeyStore.java:709) javax.crypto.KeyGenerator.generateKey (KeyGenerator.java:604)

On other devices it is working fine. Can anybody have any idea about this?

0

There are 0 answers