Android Gradle プラグイン 7.4.0(2023 年 1 月)
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Android Gradle プラグイン 7.4.0 はメジャー リリースで、さまざまな新機能や改善措置が組み込まれています。
互換性
|
最小バージョン |
デフォルトのバージョン |
備考 |
Gradle |
7.5 |
7.5 |
詳細については、Gradle のアップデートをご覧ください。 |
SDK Build Tools |
30.0.3 |
30.0.3 |
SDK Build Tools をインストールまたは設定します。 |
NDK |
なし |
23.1.7779620 |
別のバージョンの NDK をインストールまたは設定します。 |
JDK |
11 |
11 |
詳細については、JDK バージョンの設定をご覧ください。 |
AGP Upgrade Assistant のアップグレード後のレポートとロールバック機能
AGP Upgrade Assistant でアップグレード後のレポートが追加されました。このレポートには、完了したステップと、アップグレードが成功したかどうかが記載されています。アップグレード後、プロジェクトのビルドまたはテストに問題がある場合は、Upgrade Assistant によって行われた変更を元に戻すアクションも記載されています。
プロジェクトのインポートが並行して実行される
Studio IDE で、Gradle 7.4.2 以降と Android Gradle プラグイン 7.2.0 以降を使用している場合、プロジェクトが並行してインポートされるようになりました。具体的には、Android Studio が Gradle 同期をトリガーすると、ビルドに含まれるプロジェクトを記述する情報が並行して作成されます。通常、これにより同期プロセスが高速化されます(特に大規模なプロジェクトの場合)。ベンチマークでは、非常に大規模なプロジェクト(3,500 個の Gradle サブプロジェクトを含む)の Gradle モデルのビルドにかかる時間が 10 分から 5 分に 50% 短縮されています。
Android Gradle プラグインが JVM 11 バイトコードをターゲットに
Android Gradle プラグイン 7.4.0-alpha04 以降、AGP には JVM 11 バイトコードが付属しています。つまり、AGP に対してコンパイルする場合や、カスタム Lint チェックを記述する場合は、JVM 11 バイトコードをターゲットにする必要があります。この方法の 1 つとして、モジュール レベルの build.gradle
ファイルに次のコードを含める方法があります。
sourceCompatibility = "11"
targetCompatibility = "11"
パッチリリース
Android Gradle プラグイン 7.4 のパッチリリースを以下に示します。
Android Gradle プラグイン 7.4.1(2023 年 2 月)
このマイナー アップデートには、次のバグ修正が含まれています。
修正された問題 |
非推奨に関する警告に対処して Gradle 9.0 に備えるため、destination プロパティから outputLocation プロパティに移行する
|
AGP 7.4.0-rc01 が Variant API を破損し、「Querying the mapped value of map(provider(java.util.Set)) before task '...' has completed is not supported」と表示される
|
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-09-05 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-05 UTC。"],[],[],null,["Android Gradle Plugin 7.4.0 is a major release that includes a variety of new\nfeatures and improvements.\n\nCompatibility\n\n\n| | Minimum version | Default version | Notes |\n|----------------:|:---------------:|:---------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n| Gradle | 7.5 | 7.5 | To learn more, see [updating Gradle](/build/releases/gradle-plugin?buildsystem=ndk-build#updating-gradle). |\n| SDK Build Tools | 30.0.3 | 30.0.3 | [Install](/studio/intro/update#sdk-manager) or [configure](/tools/releases/build-tools) SDK Build Tools. |\n| NDK | N/A | 23.1.7779620 | [Install](/studio/projects/install-ndk#specific-version) or [configure](/studio/projects/install-ndk#apply-specific-version) a different version of the NDK. |\n| JDK | 11 | 11 | To learn more, see [setting the JDK version](/studio/intro/studio-config#jdk). |\n\n\u003cbr /\u003e\n\nAGP Upgrade Assistant post-upgrade report and rollback functionality\n\nThe AGP Upgrade Assistant now includes a post-upgrade report. This report\ndescribes the steps that were completed and if the upgrade was successful or\nunsuccessful. It also includes an action to revert changes that were made by\nthe upgrade assistant, if there are issues building or testing the project\nafter the upgrade.\n\nProject import runs in parallel\n\nThe Studio IDE now imports projects in parallel when you use Gradle 7.4.2 or\nhigher and Android Gradle plugin 7.2.0 or higher. Specifically, when Android\nStudio triggers a Gradle sync, the information that describes projects included\nin your build is created in parallel. This usually speeds up the syncing\nprocess, especially for larger projects. Benchmarks show that the time it takes\nto build Gradle models for a very large project (with 3,500 Gradle subprojects)\nis reduced by 50%, from 10 minutes to 5 minutes.\n\nAndroid Gradle plugin targets JVM 11 bytecode\n\nStarting with Android Gradle plugin 7.4.0-alpha04, AGP ships wth JVM 11\nbytecode. This means that if you compile against AGP, or write custom Lint\nchecks, you need to start targeting JVM 11 bytecode. One of the ways to do this\nis to include the following in your module-level `build.gradle` file: \n\n sourceCompatibility = \"11\"\n targetCompatibility = \"11\"\n\nPatch releases\n\n\u003cbr /\u003e\n\nThe following is a list of the patch releases for Android Gradle Plugin\n7.4.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nAndroid Gradle Plugin 7.4.1 (February 2023)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThis minor update includes the following bug fixes:\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Fixed issues ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Issue #242831042](https://issuetracker.google.com/issues/242831042) Migrate from `destination` property to `outputLocation` property to address deprecation warning and prepare for Gradle 9.0 |\n| [Issue #261329823](https://issuetracker.google.com/issues/261329823) AGP 7.4.0-rc01 breaks Variant API with \"Querying the mapped value of `map(provider(java.util.Set))` before task '...' has completed is not supported\" |\n\n\u003cbr /\u003e"]]