Agp 9 Upgrade
Upgrades, or migrates, an Android project to use Android Gradle Plugin (AGP) version 9. Do not use this skill for migrating Kotlin Multiplatform (KMP) projects.
MCP get_skill({ skillId: "agp-9-upgrade-447195bb" })Use this skill with your agent
Create a free account and connect via MCP
## Migration guide See the [AGP 9 migration guide](references/android/build/releases/agp-9-0-0-release-notes.md) for the major changes, many breaking, in AGP 9 compared to AGP 8. ## Requirements If the user requests to update or migrate to AGP 9, first check the AGP version used in the project. If it is lower than 9, stop and ask the user to run the AGP Upgrade Assistant in Android Studio to update to the latest stable version of AGP, and confirm when done. The user may also request that this requirement be skipped; if this is the case, you should update the version of AGP to the latest stable version as part of the AGP 9 migration. See the [AGP 9 migration guide](references/android/build/releases/agp-9-0-0-release-notes.md) for how to do this. Each version of AGP has its own set of compatibilities with other tools, such as Gradle, JDK, and Kotlin. The release notes for each of these versions will include a **Compatibility** table indicating the minimum versions for these tools. Do not use this skill for KMP projects, as they are unsupported. ## Steps If AGP is already at 9 or higher, then do the following: ### Step 1: Update dependencies If KSP (`com.google.devtools.ksp`) is used in the project, ensure it is on version 2.3.6 or higher. If Hilt is used in the project, ensure it is on version 2.59.2 or higher. ### Step 2: Migrate to built-in Kotlin See [the guide](references/android/build/migrate-to-built-in-kotlin.md) for detailed information. ### Step 3. Migrate to the new AGP DSL See [the guide](references/android/build/releases/agp-9-0-0-release-notes.md) for detailed information. See also [gradle-recipes](references/recipes.md) for examples on how to migrate old code to code that is compatible with AGP 9 and the new DSL. ### Step 4. Migrate kapt to KSP or legacy-kapt If KSP (`com.google.devtools.ksp`) or kapt (`org.jetbrains.kotlin.kapt`) are used in the project, see [KSP, kapt, and legacy-kapt](references/ksp-kapt.md) for detailed migration steps. ### Step 5. BuildConfig If any Android module contains custom BuildConfig fields, see [BuildConfig](references/buildconfig.md) for detailed information. ### Step 6. Update gradle.properties After the migration, check gradle.properties. Remove the following flags: 1. android.builtInKotlin 2. android.newDsl 3. android.uniquePackageNames 4. android.enableAppCompileTimeRClass Additionally, delete all temporary files you've created. ## Guidelines - Never write or run python scripts. - Only search the Gradle dependency cache when inspecting external dependencies, and only as a last resort. - Never add `android.disallowKotlinSourceSets=false` to `gradle.properties`. - When verifying changes, don't run the `clean` task. This is a waste of time. ## Verification After migration, verify the following: 1. Gradle IDE sync succeeds. 2. `./gradlew help` succeeds. 3. `./gradlew build --dry-run` succeeds. ## Troubleshooting Paparazzi v2.0.0-alpha04 and lower versions have issues with AGP 9. See [references/paparazzi-gradle-9.md](references/paparazzi-gradle-9.md) for details.
Related Skills
More skills in Software Engineering
Accessibility Standards
Comprehensive web accessibility standards based on WCAG 2.2 AA, with 38+ anti-patterns, legal enforcement context (EAA, ADA Title II), WAI-ARIA patterns, and framework-specific fixes for modern web frameworks and libraries.
Accord
Authoring unified specification packages across Business/Development/Design teams via staged elaboration (L0 Vision → L1 Requirements → L2 Team Detail → L3 Acceptance Criteria). No code. Use when authoring cross-team specs, building L0-L3 packages, or aligning Biz/Dev/Design on a single source of truth.
Acquire Codebase Knowledge
Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document this architecture", "onboard me to this repo", or "create codebase docs". Do not trigger for routine feature implementation, bug fixes, or narrow code edits unless the user asks for repository-level discovery.
Acreadiness Assess
Run the AgentRC readiness assessment on the current repository and produce a static HTML dashboard at reports/index.html. Wraps `npx github:microsoft/agentrc readiness` and hands off rendering to the @ai-readiness-reporter custom agent. Supports policies (--policy) for org-specific scoring. Use when asked to assess, audit, or score the AI readiness of a repo.
Acreadiness Generate Instructions
Generate tailored AI agent instruction files via AgentRC instructions command. Produces .github/copilot-instructions.md (default, recommended for Copilot in VS Code) plus optional per-area .instructions.md files with applyTo globs for monorepos. Use after running /acreadiness-assess to close gaps in the AI Tooling pillar.
Acreadiness Policy
Help the user pick, write, or apply an AgentRC policy. Policies customise readiness scoring by disabling irrelevant checks, overriding impact/level, setting pass-rate thresholds, or chaining org baselines with team overrides. Use when the user asks about strict mode, AI-only scoring, custom weights, CI gating, or wants org-wide standardisation.
Explore Other Categories
Skills from other categories with shared topics
Display AI Glasses With Jetpack Compose Glimmer
Display AI Glasses With Jetpack Compose Glimmer linked from Android official agent skills, with the upstream skill instructions available on GitHub.
Display Glasses With Jetpack Compose Glimmer
Provides guidelines for developing projected Android XR apps for display glasses using the Jetpack Compose Glimmer UI toolkit. This skill covers foundational Glimmer design principles, workflows for implementing Jetpack Compose Glimmer, and interaction models for the glasses form factor. Use this skill to build an Android XR Augmented Experience app with Jetpack Compose Glimmer that adheres to the Glimmer design system for optimized glasses styling.
Edge To Edge
Use this skill to migrate your Jetpack Compose app to add adaptive edge-to-edge support and troubleshoot common issues. Use this skill to fix UI components (like buttons or lists) that are obscured by or overlapping with the navigation bar or status bar, fix IME insets, and fix system bar legibility.