> 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/ja/help/knowledge-base/android-12-keystore-creation-issue.md).

# Android 12でのKeystore作成の問題

## 概要

NFC Wallet SDK は、エンドユーザー認証を必要とする Android Keystore のキーを作成します。このキーは、非接触決済中に使用される支払い資産を保護します。一部のデバイスでは、認証が必要な場合にキーの作成が失敗します。

{% hint style="warning" %}
この問題は、次の場合にウォレットへのアクセスと支払いを妨げます **CDCVM** デバイス認証が必要です。
{% endhint %}

### 症状

この **デジタルウォレットアプリケーション** 初期化時にキーを作成します **Device CVM**。これは次を呼び出したときに発生します `DeviceCVMManager.INSTANCE.initialize(CHVerificationMethod)`.

この問題は通常、次の条件で発生します:

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

キーの作成に失敗すると、NFC Wallet SDK は `DeviceCVMException`をスローします。メッセージは通常次のとおりです:

`AKS キーの作成に失敗しました。秘密鍵の保存に失敗しました`

```java
// ウォレット用の Device CVM を初期化
DeviceCVMManager.INSTANCE.initialize(CHVerificationMethod.BIOMETRICS);
```

NFC Wallet SDK のデバッグビルドで再現すると、次の内容も表示される場合があります:

```
java.security.KeyStoreException: 秘密鍵の保存に失敗しました
 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)
 …
 原因: android.security.KeyStoreException: Keystore が初期化されていません
   at android.security.KeyStore2.getKeyStoreException(KeyStore2.java:384)
   at android.security.KeyStoreSecurityLevel.handleExceptions(KeyStoreSecurityLevel.java:59)
   at android.security.KeyStoreSecurityLevel.importKey(KeyStoreSecurityLevel.java:204
   …
```

### 根本原因

同様の Android プラットフォームの問題が Google Issue Tracker で追跡されています。参照: [issue 195330769](https://issuetracker.google.com/issues/195330769).

Google によると、この修正は次から利用可能です **Android 12L**。この修正は **Android 12**.

### 影響を受ける Android のバージョンとデバイス

ほとんどの報告は **Android 12**に関するもので、Xiaomi デバイスでよく見られます。2026 年 2 月時点で、以下の網羅的でない一覧が報告されています:

| ベンダー    | モデル            | Android バージョン | 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      |

### 回避策と次の手順

1. **デバイスが Android 12 を実行している場合は、Android 12L 以降にアップグレードしてください。**
2. **デバイスが別のバージョンを実行している場合は、デバイスのロックと生体認証をリセットしてください。**
   * 画面ロックを削除します。
   * デバイスを再起動します。
   * 生体認証を再登録します。
   * 画面ロックを再設定します。
3. **Device CVM の初期化を再試行します。**

問題が Android 12 以外のデバイスで再現する場合は、サポートチケットを開いてください。デバイスのモデル、Android バージョン、および完全なログを共有してください。次を参照してください [Thales NFC Wallet SDK の問題を報告する方法は？](/nfc-wallet-sdk-android/ja/help/knowledge-base/report-nfc-wallet-sdk-issues.md)。ログは次を使用して取得します [Android デバイスからログを取得する](/nfc-wallet-sdk-android/ja/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/ja/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.
