[null,null,["最后更新时间 (UTC):2025-07-31。"],[],[],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)."]]