Stay organized with collections
Save and categorize content based on your preferences.
The main interface for interacting with Gemini is the chat window. You can
use it to ask questions ranging from very simple and open-ended ones to specific
problems that you need help with.
Here are some examples of things you might ask; however, we encourage you to
experiment with any topics related to Android development:
How do I add camera support to my app?
I want to create a Room database.
Can you remind me of the format for Javadocs?
What is dark theme?
What's the best way to get location on Android?
Gemini remembers the context of the conversation, so you can also ask it
follow-up questions, such as:
Can you give me the code for this in Kotlin?
Can you show me how to do it in Compose?
Gemini in Android Studio is uniquely equipped to answers questions about a
specific capability or workflow in the Studio IDE, for example:
How do I analyze jank in my app?
Where do I find the CPU profiler?
Show query history
Your queries to Gemini in Android Studio are saved for every coding session in
Android Studio. To see your previous queries, click Show Query History
in the Gemini chat box. A menu appears with all the queries you've submitted in
this coding session.
To re-submit a previous query, click the query to paste it in the chat box and
click Submit.
When you quit Android Studio, the query history is cleared. To save and manage
commonly used prompts across coding sessions, use the
Prompt Library.
Clear conversation history
Gemini remembers your previous chats and is able to use them as context for your
conversation. If your chat history is no longer relevant to what you're
currently trying to achieve, reset the chat history by clicking
Clear Conversation History
in the Gemini pane.
Next steps
For tips on how to get the most out of chats with Gemini in Android Studio,
see Best practices.
Browse the Prompt Gallery for inspiration on how to use Gemini.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-07-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-31 UTC."],[],[],null,["# Chat with Gemini\n\n| **Tip:** Starting with Android Studio Narwhal Feature Drop, Gemini in Android Studio has [agent mode](/studio/gemini/agent-mode). Agent mode can handle complex tasks that span multiple steps and files, going beyond what you can do with chat alone.\n\nThe main interface for interacting with Gemini is the chat window. You can\nuse it to ask questions ranging from very simple and open-ended ones to specific\nproblems that you need help with.\n\nHere are some examples of things you might ask; however, we encourage you to\nexperiment with any topics related to Android development:\n\n- How do I add camera support to my app?\n- I want to create a Room database.\n- Can you remind me of the format for Javadocs?\n- What is dark theme?\n- What's the best way to get location on Android?\n\nGemini remembers the context of the conversation, so you can also ask it\nfollow-up questions, such as:\n\n- Can you give me the code for this in Kotlin?\n- Can you show me how to do it in Compose?\n\nGemini in Android Studio is uniquely equipped to answers questions about a\nspecific capability or workflow in the Studio IDE, for example:\n\n- How do I analyze jank in my app?\n- Where do I find the CPU profiler?\n\nShow query history\n------------------\n\nYour queries to Gemini in Android Studio are saved for every coding session in\nAndroid Studio. To see your previous queries, click **Show Query History**\n\nin the Gemini chat box. A menu appears with all the queries you've submitted in\nthis coding session.\n\nTo re-submit a previous query, click the query to paste it in the chat box and\nclick **Submit**.\n\nWhen you quit Android Studio, the query history is cleared. To save and manage\ncommonly used prompts across coding sessions, use the\n[Prompt Library](/studio/gemini/prompt-library).\n\nClear conversation history\n--------------------------\n\nGemini remembers your previous chats and is able to use them as context for your\nconversation. If your chat history is no longer relevant to what you're\ncurrently trying to achieve, reset the chat history by clicking\n**Clear Conversation History**\nin the Gemini pane.\n\nNext steps\n----------\n\n- For tips on how to get the most out of chats with Gemini in Android Studio, see [Best practices](/studio/gemini/best-practices).\n- Browse the [Prompt Gallery](/studio/gemini/prompt-gallery) for inspiration on how to use Gemini.\n- Help Gemini understand the context for your query by skillfully [attaching files](/studio/gemini/attach-file) and [attaching images](/studio/gemini/attach-image)."]]