> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/es/help/knowledge-base/android-12-keystore-creation-issue.md).

# Problema de creación de Keystore en Android 12

## Resumen

NFC Wallet SDK crea una clave de Android Keystore que requiere autenticación del usuario final. Esta clave protege los activos de pago utilizados durante los pagos sin contacto. En algunos dispositivos, la creación de la clave falla cuando se requiere autenticación.

{% hint style="warning" %}
Este problema bloquea el acceso a la billetera y los pagos cuando **CDCVM** requiere autenticación del dispositivo.
{% endhint %}

### Síntomas

La **aplicación de cartera digital** crea la clave cuando se inicializa **CVM del dispositivo**. Esto ocurre cuando llama a `DeviceCVMManager.INSTANCE.initialize(CHVerificationMethod)`.

El problema suele ocurrir con:

* `CHVerificationMethod.DEVICE_KEYGUARD`
* `CHVerificationMethod.BIOMETRICS`

Cuando falla la creación de la clave, NFC Wallet SDK arroja `DeviceCVMException`. El mensaje suele ser:

`Problema al crear la clave AKS. No se pudo almacenar la clave privada`

```java
// Inicializar Device CVM para la billetera
DeviceCVMManager.INSTANCE.initialize(CHVerificationMethod.BIOMETRICS);
```

Cuando reproduce el problema con una compilación de depuración de NFC Wallet SDK, también puede ver:

```
java.security.KeyStoreException: No se pudo almacenar la clave privada
 at android.security.keystore2.AndroidKeyStoreSpi.setPrivateKeyEntry(AndroidKeyStoreSpi.java:581)
 at android.security.keystore2.AndroidKeyStoreSpi.engineSetEntry(AndroidKeyStoreSpi.java:1211)
 at java.security.KeyStore.setEntry(KeyStore.java:1617)
 at java.lang.reflect.Method.invoke(Native Method)
 …
 Causado por: android.security.KeyStoreException: Keystore no inicializado
   at android.security.KeyStore2.getKeyStoreException(KeyStore2.java:384)
   at android.security.KeyStoreSecurityLevel.handleExceptions(KeyStoreSecurityLevel.java:59)
   at android.security.KeyStoreSecurityLevel.importKey(KeyStoreSecurityLevel.java:204
   …
```

### Causa raíz

Un problema similar de la plataforma Android está registrado en Google Issue Tracker. Consulte [incidencia 195330769](https://issuetracker.google.com/issues/195330769).

Google indica que la corrección está disponible a partir de **Android 12L**. La corrección no se ha retroportado a **Android 12**.

### Versiones y dispositivos de Android afectados

La mayoría de los informes son sobre **Android 12**, a menudo en dispositivos Xiaomi. A fecha de feb 2026, se informa la siguiente lista no exhaustiva:

| Proveedor | Modelo         | Versión de Android | Nivel de API |
| --------- | -------------- | ------------------ | ------------ |
| Honor     | NTH-NX9        | Android 12         | 31           |
| LGE       | LG-US996       | Android 8.0        | 26           |
| OnePlus   | KB2003         | Android 12         | 31           |
| Samsung   | SM-G998B       | Android 12         | 31           |
| Samsung   | SM-G998U       | Android 12         | 31           |
| Samsung   | SM-A426BZKHXSP | Android 12         | 31           |
| Samsung   | SM-A516U       | Android 12         | 31           |
| Xiaomi    | M2101K7BNY     | Android 12         | 31           |
| Xiaomi    | 2109119DG      | Android 12         | 31           |
| Xiaomi    | 22031116BG     | Android 12         | 31           |
| Xiaomi    | M2007J3SG      | Android 12         | 31           |
| Xiaomi    | M2012K11G      | Android 12         | 31           |
| Xiaomi    | M2007J17G      | Android 12         | 31           |
| Xiaomi    | M2101K9G       | Android 12         | 31           |
| Xiaomi    | M2007J20CG     | Android 12         | 31           |
| Xiaomi    | 21081111RG     | Android 12         | 31           |
| Xiaomi    | M2004J19C      | Android 11         | 30           |
| Xiaomi    | POCO F2 Pro    | Android 12         | 31           |
| Xiaomi    | M2011K2G       | Android 12         | 31           |
| Xiaomi    | M2102J20SG     | Android 12         | 31           |

### Soluciones temporales y siguientes pasos

1. **Si el dispositivo ejecuta Android 12, actualice a Android 12L o posterior.**
2. **Si el dispositivo ejecuta otra versión, restablezca el bloqueo del dispositivo y la biometría.**
   * Elimine el bloqueo de pantalla.
   * Reinicie el dispositivo.
   * Vuelva a registrar la biometría.
   * Configure de nuevo el bloqueo de pantalla.
3. **Vuelva a intentar la inicialización de Device CVM.**

Si el problema se reproduce en dispositivos que no son Android 12, abra un ticket de soporte. Comparta el modelo del dispositivo, la versión de Android y los registros completos. Siga [¿Cómo informar problemas con Thales NFC Wallet SDK?](/nfc-wallet-sdk-android/es/help/knowledge-base/report-nfc-wallet-sdk-issues.md). Capture los registros con [Recuperar registros de un dispositivo Android](/nfc-wallet-sdk-android/es/help/knowledge-base/retrieve-logs-from-an-android-device.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/es/help/knowledge-base/android-12-keystore-creation-issue.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
