{"id":673033,"date":"2026-01-16T11:30:56","date_gmt":"2026-01-16T10:30:56","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=kotlin&#038;p=673033"},"modified":"2026-05-15T17:35:50","modified_gmt":"2026-05-15T16:35:50","slug":"update-your-projects-for-agp9","status":"publish","type":"kotlin","link":"https:\/\/blog.jetbrains.com\/de\/kotlin\/2026\/01\/update-your-projects-for-agp9","title":{"rendered":"Update your Kotlin projects for Android Gradle Plugin 9.0"},"content":{"rendered":"\n<p><a href=\"https:\/\/developer.android.com\/build\/releases\/agp-9-0-0-release-notes\" target=\"_blank\" rel=\"noopener\">Android Gradle plugin 9.0<\/a> is now available, and it includes two major changes that will affect existing Kotlin projects:<\/p>\n\n\n\n<ul>\n<li>Android apps need to start using AGP 9.0\u2019s <strong>built-in Kotlin support<\/strong>.<\/li>\n\n\n\n<li>Kotlin Multiplatform projects targeting Android need to migrate to the <strong>new Android KMP library plugin<\/strong>.<\/li>\n<\/ul>\n\n\n\n<p>This post provides some details about these changes and points you to the resources that you\u2019ll need to update your existing projects.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Everything New in AGP 9.0 For Kotlin Projects\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/m0Cq6J-V_RY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>You\u2019ll also need to update tools and plugins that depend on AGP to their latest versions with support for AGP 9.0. If you use Android Studio, you&#8217;ll need to use Otter 3 Feature Drop or later.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Note: Support for AGP 9.0 is coming soon to IntelliJ IDEA, expected to arrive in Q1 2026.<\/p>\n<\/blockquote>\n\n\n\n<p>For information about Gradle plugin compatibility, you can refer to <a href=\"https:\/\/agp-status.frybits.com\/agp-9.0.0\/\" target=\"_blank\" rel=\"noopener\">this community-maintained page<\/a>.<\/p>\n\n\n\n<p>We are working on adopting AGP 9.0 in our documentation, samples, and wizards. This means that they will all use AGP 9.0 by default and already include these changes in their respective configurations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Use built-in Kotlin<\/h2>\n\n\n\n<p>Previously, Android projects had to apply the Kotlin Android plugin (<code>org.jetbrains.kotlin.android<\/code>) to add support for Kotlin source files. With AGP 9.0, Kotlin support is built in and enabled by default, so you no longer need to apply the Kotlin Android plugin separately for Android apps.<\/p>\n\n\n\n<p>The main migration step here is to remove usages of the Kotlin Android plugin from your projects. However, if your project uses kapt for annotation processing or sets custom <code>kotlinOptions<\/code>, you\u2019ll need to update those configurations as well.<\/p>\n\n\n\n<p>Read the <a href=\"https:\/\/developer.android.com\/build\/migrate-to-built-in-kotlin\" target=\"_blank\" rel=\"noopener\">migration guide<\/a> in the Android documentation for step-by-step instructions.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>With AGP 9.0, you can still opt out of these changes <em>temporarily<\/em> by adding <code>android.builtInKotlin=false<\/code> to your <code>gradle.properties<\/code>. However, this will no longer work in AGP 10.0, which is expected sometime in 2026.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Use the new Android KMP library plugin<\/h2>\n\n\n\n<p>In previous versions, the Android Gradle plugin provided two different plugins you could apply to a module:<\/p>\n\n\n\n<ul>\n<li>The Android library plugin (<code>com.android.library<\/code>).<\/li>\n\n\n\n<li>The Android application plugin (<code>com.android.application<\/code>).<\/li>\n<\/ul>\n\n\n\n<p>Either of them could be used in combination with the KMP plugin (<code>org.jetbrains.kotlin.multiplatform<\/code>) to set up a multiplatform module.<\/p>\n\n\n\n<p>AGP 9.0 introduces a new, simplified Android KMP library plugin (<code>com.android.kotlin.multiplatform.library<\/code>), built specifically for multiplatform projects. The previously used Android library and Android application plugins are no longer compatible with the KMP plugin in the same module, which means you\u2019ll need to migrate any multiplatform modules to the new plugin. This migration will be different for library and application modules; you can learn more about both scenarios below.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>With AGP 9.0, you can still opt out of these changes <em>temporarily<\/em> by adding <code>android.builtInKotlin=false<\/code> and <code>android.newDsl=false<\/code> to your <code>gradle.properties<\/code>. However, this will no longer work in AGP 10.0, which is expected sometime in 2026.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">Migrating a library module<\/h3>\n\n\n\n<p>If you have a module that uses the Android library plugin and the Kotlin Multiplatform plugin together, you\u2019ll have to <strong>replace the Android library plugin with the Android KMP library plugin<\/strong>. This means you\u2019ll have to update the build configuration of your existing module, but generally no changes are required to your project structure or source code.<\/p>\n\n\n\n<p>The new Android KMP library plugin has default settings that are designed for Kotlin Multiplatform and optimized for build speed and stability. Some previous configuration options have been removed or moved to new APIs.<\/p>\n\n\n\n<p>Read the <a href=\"https:\/\/developer.android.com\/kotlin\/multiplatform\/plugin#migrate\" target=\"_blank\" rel=\"noopener\">migration guide<\/a> to learn about the differences and get step-by-step instructions on how to migrate a library module to the new plugin.<\/p>\n\n\n    <div class=\"buttons\">\n        <div class=\"buttons__row\">\n                                                <a href=\"https:\/\/developer.android.com\/kotlin\/multiplatform\/plugin#migrate\" class=\"btn\" target=\"\" rel=\"noopener\">Migrate a library module<\/a>\n                                                    <\/div>\n    <\/div>\n\n\n\n\n\n\n\n<h3 class=\"wp-block-heading\">Migrating an application module<\/h3>\n\n\n\n<p>Many projects apply both the Android application plugin and the Kotlin Multiplatform plugin in the same module. A module like this contains shared multiplatform code as well as an Android application with all of its related build configuration. This was the recommended structure in the past, and if you created your project using the KMP wizard, your project probably has a single <code>composeApp<\/code> module that\u2019s set up like this.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" width=\"1966\" height=\"870\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2026\/01\/before.png\" alt=\"\" class=\"wp-image-673062\" style=\"aspect-ratio:2.259770114942529;width:600px\"\/><figcaption class=\"wp-element-caption\">The starting setup<\/figcaption><\/figure><\/div>\n\n\n<p>Modules like this also have to be migrated to use the new Android KMP library plugin in the module that contains shared code, which requires multiple steps.<\/p>\n\n\n\n<p>First, you\u2019ll have to <strong>create a new module for the entry point of your app and apply the Android application plugin<\/strong> there. This new module can be relatively small and simple, containing the build configuration to package an Android app and its entry point, such as <code>Activity<\/code> and <code>Application<\/code> classes (all represented by <code>MainActivity<\/code> in the illustrations here).<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>When using AGP 9.0, this new module doesn\u2019t need to apply a Kotlin plugin, as it can use the built-in Kotlin support (as detailed above).<\/p>\n<\/blockquote>\n\n\n\n<p>Then, this new application module should <strong>depend on the existing multiplatform module<\/strong> to have access to its contents. The multiplatform module can now become an Android library, which means you should <strong>migrate it to the new Android KMP library<\/strong><strong><em> <\/em><\/strong><strong>plugin<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" width=\"1961\" height=\"1718\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2026\/01\/after.png\" alt=\"\" class=\"wp-image-673073\" style=\"width:600px\"\/><figcaption class=\"wp-element-caption\">The migrated project<\/figcaption><\/figure><\/div>\n\n\n<p>To migrate an Android application module to AGP 9.0, follow the detailed steps in the <a href=\"https:\/\/kotlinlang.org\/docs\/multiplatform\/multiplatform-project-agp-9-migration.html\" target=\"_blank\" rel=\"noopener\">migration guide<\/a>.<\/p>\n\n\n    <div class=\"buttons\">\n        <div class=\"buttons__row\">\n                                                <a href=\"https:\/\/kotlinlang.org\/docs\/multiplatform\/multiplatform-project-agp-9-migration.html\" class=\"btn\" target=\"\" rel=\"noopener\">Migrate an application module<\/a>\n                                                    <\/div>\n    <\/div>\n\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>We recommend making these configuration changes in your existing projects as soon as possible to ensure smooth upgrades to the latest versions of AGP in the future.<\/p>\n\n\n\n<p>In addition to the links above, you can read the <a href=\"https:\/\/developer.android.com\/build\/releases\/agp-9-0-0-release-notes\" target=\"_blank\" rel=\"noopener\">full release notes for AGP 9.0<\/a> to learn more about what\u2019s new.<\/p>\n\n\n\n<p>If you encounter any issues with AGP 9.0 itself, <a href=\"https:\/\/issuetracker.google.com\/issues\/new?component=192708\" target=\"_blank\" rel=\"noopener\">create a new issue<\/a> in the Android Studio component of the Google issue tracker.<\/p>\n\n\n\n<p>For problems related to the Kotlin Multiplatform IDE plugin, <a href=\"https:\/\/youtrack.jetbrains.com\/newIssue?project=KMT\" target=\"_blank\" rel=\"noopener\">create an issue in the KMT tracker<\/a>.<\/p>\n\n\n\n<p>To provide feedback on Kotlin documentation, <a href=\"https:\/\/youtrack.jetbrains.com\/newIssue?project=KT\" target=\"_blank\" rel=\"noopener\">create an issue on YouTrack<\/a> or report it in the <a href=\"https:\/\/slack-chats.kotlinlang.org\/c\/multiplatform\" target=\"_blank\" rel=\"noopener\">#multiplatform channel<\/a> on the Kotlinlang Slack.<\/p>\n","protected":false},"author":1478,"featured_media":673107,"comment_status":"closed","ping_status":"closed","template":"","categories":[956],"tags":[],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/de\/wp-json\/wp\/v2\/kotlin\/673033"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/de\/wp-json\/wp\/v2\/kotlin"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/de\/wp-json\/wp\/v2\/types\/kotlin"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/de\/wp-json\/wp\/v2\/users\/1478"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/de\/wp-json\/wp\/v2\/comments?post=673033"}],"version-history":[{"count":10,"href":"https:\/\/blog.jetbrains.com\/de\/wp-json\/wp\/v2\/kotlin\/673033\/revisions"}],"predecessor-version":[{"id":684980,"href":"https:\/\/blog.jetbrains.com\/de\/wp-json\/wp\/v2\/kotlin\/673033\/revisions\/684980"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/de\/wp-json\/wp\/v2\/media\/673107"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/de\/wp-json\/wp\/v2\/media?parent=673033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/de\/wp-json\/wp\/v2\/categories?post=673033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/de\/wp-json\/wp\/v2\/tags?post=673033"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/de\/wp-json\/wp\/v2\/cross-post-tag?post=673033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}