Wtyczka Androida do obsługi Gradle 7.4.0 (styczeń 2023 r.)
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Wtyczka Androida do obsługi Gradle w wersji 7.4.0 to ważna wersja, która zawiera wiele nowych funkcji i ulepszeń.
Zgodność
Raport po uaktualnieniu i funkcja wycofywania w Asystencie uaktualniania AGP
Asystent uaktualniania AGP zawiera teraz raport po uaktualnieniu. Ten raport
zawiera opis wykonanych czynności oraz informację o tym, czy uaktualnienie się powiodło. Obejmuje też działanie, które umożliwia wycofanie zmian wprowadzonych przez asystenta uaktualniania, jeśli po uaktualnieniu wystąpią problemy z kompilacją lub testowaniem projektu.
Importowanie projektu przebiega równolegle
Środowisko IDE Studio importuje teraz projekty równolegle, gdy używasz Gradle w wersji 7.4.2 lub nowszej oraz wtyczki Android Gradle w wersji 7.2.0 lub nowszej. Gdy Android Studio wywołuje synchronizację Gradle, informacje opisujące projekty uwzględnione w kompilacji są tworzone równolegle. Zwykle przyspiesza to proces synchronizacji, zwłaszcza w przypadku większych projektów. Testy porównawcze pokazują, że czas potrzebny na utworzenie modeli Gradle w przypadku bardzo dużego projektu (z 3500 podprojektami Gradle) został skrócony o 50% – z 10 minut do 5 minut.
Wtyczka Androida do obsługi Gradle jest kierowana na kod bajtowy JVM 11
Od wersji 7.4.0-alpha04 wtyczka Androida do obsługi Gradle jest dostarczana z kodem bajtowym JVM 11. Oznacza to, że jeśli kompilujesz kod pod kątem AGP lub piszesz niestandardowe testy Lint, musisz zacząć kierować go na kod bajtowy JVM 11. Jednym ze sposobów na to jest umieszczenie w pliku build.gradle
na poziomie modułu tego kodu:
sourceCompatibility = "11"
targetCompatibility = "11"
Wersje poprawek
Poniżej znajdziesz listę wersji poprawkowych wtyczki Androida do obsługi Gradle w wersji 7.4.
Wtyczka Androida do obsługi Gradle w wersji 7.4.1 (luty 2023 r.)
Ta niewielka aktualizacja zawiera następujące poprawki błędów:
Rozwiązane problemy |
Migracja z usługi destination do usługi outputLocation w celu wyeliminowania ostrzeżenia o wycofaniu i przygotowania się na Gradle 9.0
|
AGP 7.4.0-rc01 powoduje błąd w interfejsie Variant API z komunikatem „Querying the mapped value of
map(provider(java.util.Set)) before task '...' has completed is not supported”
|
Treść strony i umieszczone na niej fragmenty kodu podlegają licencjom opisanym w Licencji na treści. Java i OpenJDK są znakami towarowymi lub zastrzeżonymi znakami towarowymi należącymi do firmy Oracle lub jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-09-05 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 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"]]