> ## Documentation Index
> Fetch the complete documentation index at: https://translations.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Androidアプリケーション用Universal Components

> Androidアプリケーション用のAuth0 Universal Componentsをインストールして設定する方法を説明します。

export const ReleaseStageNotice = ({feature, stage, plans, contact, terms}) => {
  const stageTextMap = {
    "beta": "Beta",
    "ea": "早期アクセス"
  };
  const stageText = stageTextMap[stage] || "製品リリース段階";
  const prsLink = "/docs/troubleshoot/product-lifecycle/product-release-stages";
  const linkify = (text, url) => {
    return <a href={url} target="_blank" rel="noreferrer" class="link">{text}</a>;
  };
  const includeDetails = (plans, contact, terms) => {
    const hasDetails = terms || plans || contact;
    if (!hasDetails) return null;
    return <span data-as="p">
            {plans && <>この機能は{linkify(`${plans}プラン`, "https://auth0.com/pricing")}でご利用いただけます。 </>}
            {contact && "参加をご希望の場合は、" + contact + "までお問い合わせください。 "}
            {terms && <>この機能を使用することにより、Oktaの該当する無料トライアル規約および{linkify("Master Subscription Agreement", "https://www.okta.com/legal")}に同意したものとみなされます。</>}
        </span>;
  };
  return <Warning>
            <span data-as="p">
                <strong>{feature}機能は現在、{linkify(stageText, prsLink)}です。</strong>
            </span>

            {includeDetails(plans, contact, terms)}
        </Warning>;
};

<ReleaseStageNotice feature="Auth0 Universal Components" stage="beta" terms="true" contact="Auth0 Support" />

Auth0 [Universal Components for Android](https://github.com/auth0/ui-components-android) SDKは、[Jetpack Compose](https://developer.android.com/compose) を使用したAuth0のアイデンティティフロー向けに、すぐに利用できる埋め込み可能なUIを提供します。

Universal Components for Androidは、[Auth0 Android SDK](https://github.com/auth0/Auth0.Android) を基盤としており、[My Account APIs](/docs/ja-jp/manage-users/my-account-api) と統合されています。

<div id="prerequisites">
  ## 前提条件
</div>

Universal Components for Android SDK を設定するには、以下が必要です。

* オペレーティングシステム: **Android 11 以降** (API 30) 。
* プログラミング言語: **Kotlin 2.2 以降**、**Android Gradle Plugin 8.11 以降**、**Jetpack Compose BOM 2024.09.00 以降**、**JDK 17 以降**。

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  Auth0 の[パスキー](/docs/ja-jp/authenticate/database-connections/passkeys)をサポートするには、**Android 14 以降** が必要です。
</Callout>

<div id="install-the-sdk">
  ## SDK をインストールする
</div>

Universal Components for Android SDK は、[Maven Central](https://mvnrepository.com/artifact/com.auth0) リポジトリを通じて、`com.auth0.universalcomponents:universal-components` パッケージとして配布されています。

<div id="gradle">
  ### Gradle
</div>

Gradle を使用して SDK をインストールします。

1. `settings.gradle` または `settings.gradle.kts` ファイルに `mavenCentral()` リポジトリが含まれていない場合は、追加します。

   ```kotlin theme={null}
   dependencyResolutionManagement {
       repositories {
           mavenCentral()
           google()
       }
   }
   ```

2. モジュールレベルの `build.gradle` または `build.gradle.kts` に依存関係を追加します。

   ```kotlin theme={null}
   dependencies {
       implementation("com.auth0.universalcomponents:universal-components:1.0.0-beta.0")
   }
   ```

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  Auth0 では、アプリケーションで [Auth0.Android v3+](https://github.com/auth0/Auth0.Android) を使用することを推奨しています。Universal Components と同時に解決すると、古いバージョンではコンパイルエラーが発生する可能性があります。
</Callout>

<div id="configure-compose">
  ### Compose を設定する
</div>

アプリケーションの `build.gradle` ファイルで [Compose](https://developer.android.com/develop/ui/compose/setup-compose-dependencies-and-compiler#setup-compose-dependencies) が有効になっていることを確認します。

```kotlin wrap lines theme={null}
android {
    buildFeatures {
        compose = true
    }
}
```

<div id="verify-the-installation">
  ### インストールを確認する
</div>

Universal Components for Android SDK が正しくインストールされたことを確認するには、次を実行して依存関係が解決されることを確認します。

```bash wrap lines theme={null}
./gradlew app:dependencies | grep universal-components
```

<div id="sample-application">
  ## サンプルアプリケーション
</div>

[Universal Components for Android](https://github.com/auth0/ui-components-android#run-the-sample-app) SDK のサンプルアプリケーションは、GitHub で確認できます。

サンプルアプリケーションには、`Auth0UniversalComponents.initialize()` で SDK を初期化する `MainActivity.kt` と、`AuthenticatorSettingsComponent` をレンダリングする `LoginSecurityScreen.kt` が含まれています。

<div id="next-steps">
  ## 次のステップ
</div>

<CardGroup cols={2}>
  <Card title="スタイルとテーマをカスタマイズ" icon="palette" href="/docs/ja-jp/get-started/universal-components/android/android-theming">
    Auth0 のデザイントークンシステムを使用して、色、タイポグラフィ、間隔、角丸、サイズのトークンをオーバーライドします。
  </Card>

  <Card title="セルフサービスのアカウントセキュリティインターフェースを構築" icon="key" href="/docs/ja-jp/get-started/universal-components/android/components/my-account-overview">
    Auth0 テナントを準備し、SDK を初期化して、認証方法の管理 UI をレンダリングします。
  </Card>
</CardGroup>
