Gemini는 Android 스튜디오에서 AI 지원 코드 자동 완성을 제공하며, 이는 입력 시 회색의 기울임꼴 텍스트로 표시됩니다. 이 기능을 사용하면 전체 함수를 제안하여 시간을 절약하고 코딩 프로젝트를 더 빠르게 완료할 수 있습니다. AI 코드 완성 기능이 사용 설정되면 Gemini는 LLM에 컨텍스트를 제공하고 더 관련성 높은 추천을 제공하기 위해 코드의 주변 부분, 파일 유형, 기타 필요한 정보와 같은 코드베이스의 추가 정보를 전송할 수 있습니다.
AI 코드 완성을 사용하려면 다음 단계를 따르세요.
Gemini 설정에서 모든 Gemini 기능 사용을 선택하여 컨텍스트 공유를 사용 설정합니다. AI 코드 자동 완성은 Gemini가 코드베이스의 컨텍스트에 액세스할 수 있는 경우에만 작동합니다.
파일을 열고 입력을 시작합니다. 추천은 커서가 줄 끝에 있거나 빈 줄에 있을 때만 트리거됩니다.
Tab 키를 눌러 제안을 수락하고 Esc 키를 눌러 제안을 지웁니다.
시스템에서 항상 코드 완성을 생성하지는 않습니다. 모델에 높은 신뢰도로 대답을 생성할 만큼 충분한 정보가 없을 수 있습니다.
Studio IDE 하단의 Gemini 아이콘 을 클릭하고 AI 코드 완성 사용 설정을 클릭하면 언제든지 AI 코드 완성을 사용 설정하거나 중지할 수 있습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-31(UTC)
[[["이해하기 쉬움","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**."]]