2.3 KiB
2.3 KiB
Android AI Setup
You are here: AI Docs Home > Android Setup
Contents
- Setup
- Android-Specific Guidance
- MCP For Android
- Android Troubleshooting
- Next Steps
Setup: VS Code + GitHub Copilot Extension
Prerequisites
- VS Code installed and up to date.
- GitHub account with Copilot Enterprise access.
Install and Sign In (High-Level)
- Install the GitHub Copilot extension.
- Sign in with your GitHub account.
- Confirm Copilot is enabled in VS Code.
- Run a simple prompt to verify suggestions appear.
Example Prompt (VS Code)
Open a Kotlin file and add:
Example prompt:
// Create a Kotlin data class for a user profile with name and email.
Verification Steps
- Open a Kotlin file and start a small function.
- Confirm inline suggestions appear.
- Open Copilot Chat and ask a short question.
Android-Specific Guidance
- Ask for Kotlin/Java patterns with small, bounded tasks.
- Request unit tests for services and view models.
- Prefer incremental changes over large rewrites.
Example Request
Example prompt:
Refactor this repository to reduce duplication. Keep the public API the same and list tests to update.
MCP For Android (High-Level)
MCP tools can automate Android tasks like builds, tests, and diagnostics. The exact tool depends on your team setup.
What To Add Here
When you identify the approved Android MCP tool(s), add:
- Install steps
- VS Code configuration
- Example prompts
Starter Prompts
Example prompts:
Create a Kotlin data class and mapper for this API response.
Write unit tests for this repository using JUnit.
Refactor this file to reduce duplication without changing behavior.
Android Troubleshooting
- If suggestions are missing, confirm sign-in and access.
- If the extension is disabled, check extension settings.
- If responses are blocked, check network or policy constraints.
Common Setup Gaps
- Copilot access not provisioned for the GitHub account.
- VS Code extension disabled after an update.
- Multiple AI extensions competing for suggestions.
Next Steps
- For workflow patterns, read Cross-Platform AI Usage.
- For safety rules, read Governance, Privacy, and Policy.
- For cost guidance, read Usage and Token Budgeting.