--- title: "ビルドスクリプトの更新" url: https://docs.catalyst.zoho.com/ja/tutorials/zcdrive/update-build-scripts/ description: "Android Studioを使用してAndroidファイルストレージモバイルアプリを構築し、Catalyst Android SDKを使用してCatalystプロジェクトに関連付け、プロジェクトのStratusバケットにファイルを安全に保存します。" last_updated: 2026-08-17T12:16:04Z service: All Services type: tutorial related_links: - name: "Android SDK" url: /ja/sdk/android/v2/overview --- # Gradleビルドスクリプトの更新 Androidプロジェクトの[Gradleビルドスクリプト](https://developer.android.com/studio/build)にいくつかの軽微な更新を行う必要があります。Gradleは、Androidプロジェクト作成時のデフォルトビルド構成に代わる独自のカスタムビルド構成を定義する柔軟性を提供します。Gradleはアプリのビルドプロセス全体を管理し、アプリを効果的に実行できるようにします。 Androidプロジェクト内の2つのビルド構成ファイルを更新する必要があります:`settings.gradle`と、モジュールレベルの`build.gradle`です。 ![](https://catalyst-docs-development.zohostratus.in/images/tutorials/zcdrive/catalyst_zcdrive_as_gradle_1.webp) `settings.gradle:` 1. Gradleスクリプトから`settings.gradle`を開き、`dependencyResolutionManagement{}`インターフェースを見つけます。 2. デフォルトのコードを以下のコードに置き換えます: ```javascript dependencyResolutionManagement { repositories { google() mavenCentral() maven { url = uri("https://maven.zohodl.com/") } } } ``` これにより、プロジェクトに追加するリポジトリが定義され、ビルドの依存関係解決が設定されます。 Gradleがビルドを処理できなくなるため、デフォルトコードの以下の最後の2行がまだ存在していることを確認してください: ```javascript rootProject.name="ZCDrive" include':app' ``` ![settings-gradle](https://catalyst-docs-development.zohostratus.in/images/tutorials/zcdrive/settings-gradle.webp) `build.gradle:` モジュールレベルの`build.gradle`ファイルでは、特定のモジュールに固有のビルド設定を構成できます。たとえば、アプリが対応すべき最小SDKやターゲットSDK、コンパイルオプション、依存関係、またはKotlinコンパイラが生成するJVMバイトコードを設定できます。 1. Gradleスクリプトから`build.gradle (Module: ZCDrive.app)`を開き、`android{}`オブジェクトを見つけます。その中で以下のパラメータに次の値を設定します: `compileSdk 36` `targetSdk 36` `minSdk 26` ![build-gradle](https://catalyst-docs-development.zohostratus.in/images/tutorials/zcdrive/build-gradle.webp) 2. デフォルトの`dependencies{}`モジュールを以下のコードに置き換えます: ```javascript dependencies{ implementation("com.zoho.catalyst:android-sdk:3.0.1") implementation(libs.androidx.core.ktx) implementation(libs.androidx.lifecycle.runtime.ktx) implementation(libs.androidx.activity.compose) implementation(platform(libs.androidx.compose.bom)) implementation(libs.androidx.ui) implementation(libs.androidx.ui.graphics) implementation(libs.androidx.ui.tooling.preview) implementation(libs.androidx.material3) testImplementation(libs.junit) androidTestImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.espresso.core) androidTestImplementation(platform(libs.androidx.compose.bom)) androidTestImplementation(libs.androidx.ui.test.junit4) debugImplementation(libs.androidx.ui.tooling) debugImplementation(libs.androidx.ui.test.manifest) implementation(libs.androidx.appcompat) implementation(libs.androidx.recyclerview) implementation(libs.material) } ``` これらの変更を行った後、Gradleがプロジェクトのビルドを同期する必要があります。プロンプトが表示されたら**Sync Now**をクリックしてください。 ![sync-now](https://catalyst-docs-development.zohostratus.in/images/tutorials/zcdrive/sync-now.webp) カスタムビルド構成が更新されました。これで、Androidプロジェクトをビルドし、Android Studioでアプリをテストできます。