Skip to content

fix(android): Support AGP 9+#816

Merged
peitschie merged 1 commit into
mainfrom
agp-9-compat
May 25, 2026
Merged

fix(android): Support AGP 9+#816
peitschie merged 1 commit into
mainfrom
agp-9-compat

Conversation

@peitschie

Copy link
Copy Markdown
Collaborator

Guards apply plugin: 'kotlin-android' because AGP 9 pre-registers the kotlin extension itself (built-in Kotlin support), so a second registration throws Cannot add extension with name 'kotlin'.

On AGP 8 the guard is false → unchanged. On AGP 9 the apply is skipped AGP supplies Kotlin compilation via its bundled KGP 2.2.10.

Source: https://developer.android.com/build/migrate-to-built-in-kotlin

Fixes #815

Guards apply plugin: 'kotlin-android' because AGP 9 pre-registers the
kotlin extension itself (built-in Kotlin support), so a second registration
throws Cannot add extension with name 'kotlin'.

On AGP 8 the guard is false → unchanged. On AGP 9 the apply is skipped
AGP supplies Kotlin compilation via its bundled KGP 2.2.10.

Source: https://developer.android.com/build/migrate-to-built-in-kotlin

Fixes #815
@peitschie peitschie merged commit a8daed4 into main May 25, 2026
5 checks passed
@peitschie peitschie deleted the agp-9-compat branch May 25, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AGP 9 build failure: "Cannot add extension with name 'kotlin'"

1 participant