Gemini は、Android Studio で AI によるコードの予測入力機能を提供します。この機能は、入力時にグレーの斜体テキストとして表示されます。この機能により、完全な関数が提案されるため、コーディング プロジェクトをより迅速に完了できます。AI コード補完が有効になっている場合、Gemini は、コードベースから追加情報(コードの周囲の断片、ファイルタイプ、その他の必要な情報など)を送信して、LLM にコンテキストを提供し、より関連性の高い候補を提示することがあります。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-31 UTC。"],[],[],null,["# Accelerate coding with AI code completion\n\nGemini offers AI-enabled autocompletion of code in Android Studio that appears\nas gray italicized text as you type. This feature saves you time and lets you\ncomplete coding projects faster by suggesting full functions. When AI code\ncompletion is enabled, Gemini might send additional information from your\ncodebase such as surrounding pieces of your code, file types, and other\nnecessary information to provide context to the LLM and provide more relevant\nsuggestions.\n\nTo use AI code completion, follow these steps:\n\n1. Enable context sharing by selecting **Use all Gemini features** in the [Gemini settings](/studio/gemini/configure-gemini). AI code completion only works when Gemini can access context from your codebase.\n2. Open a file and start typing. Suggestions only trigger when the cursor is at the end of a line or anywhere on a blank line.\n3. Press \u003ckbd\u003eTab\u003c/kbd\u003e to accept a suggestion and \u003ckbd\u003eEsc\u003c/kbd\u003e to clear a suggestion.\n\nKeep in mind that the system won't always generate code completions. It's\npossible that the model doesn't have enough information to generate a response\nwith high confidence.\n\nYou can toggle AI code completion on and off at any time by clicking the Gemini\nicon at the bottom of the Studio IDE\n\nand clicking **Enable AI code completion**."]]