データとプライバシー
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Gemini in Android Studio はプライバシーを重視して開発されています。
Google は、コードのプライバシーを確保することが、デベロッパーの信頼を獲得し維持するうえで重要であることを理解しています。Gemini in Android Studio は、ユーザーの同意なしにコードがパソコンから離れないように設計されています。コード コンテキストを指定すると、Gemini はその追加のコンテキストを使用して、質問に的確に回答します。共有するデータはユーザーが完全に管理できます。
Google では、信頼は透明性から生まれると考えています。このページでは、データの使用方法を管理するための AI に関する取り組み、トレーニングの理念、技術的な制御について説明します。
Google の保証
Gemini は、Google の AI に関する原則を考慮して構築されています。これらの原則は、AI テクノロジーを責任を持って開発するという Google の取り組みを表すものです。
また、Gemini in Android Studio を使用する場合、Google は Google のプライバシー ポリシーと Gemini のプライバシーに関するお知らせに沿ってデータを処理します。Gemini Code Assist に登録して Gemini in Android Studio for businesses を使用する場合、Google は Google Cloud のプライバシーに関するお知らせに従ってデータを処理します。
データの収集と使用
お客様の明示的な同意がない限り、コードが Gemini と共有されることはありません。コードを Gemini と共有して、コンテキスト認識機能を有効にすることができます。これにより、Gemini はプロジェクト固有のレスポンスを提供できるようになります。
データの収集と使用の例は次のとおりです。
- 高評価 / 低評価シグナルなどのフィードバック データは、Gemini のトレーニングに使用されることがあります。
- 個人向けの Gemini in Android Studio を使用している場合、チャット エクスペリエンスで明示的に入力したコードは Gemini のトレーニングに使用されることがあります。コンテキスト認識を有効にすると、収集された情報(コードを含む)が、機械学習技術などの Google のプロダクトやサービスの改善に使用されることがあります。詳しくは、プライバシーに関するお知らせをご覧ください。
- 企業向けの Gemini in Android Studio を使用している場合、チャットで入力したコードが Gemini のトレーニングに使用されることはありません。コンテキスト認識を有効にすると、収集された情報(コードを含む)が、機械学習技術などの Google のプロダクトやサービスの改善に使用されることはありません。詳細については、Google Cloud のプライバシーに関するお知らせをご覧ください。
AI コード補完機能の使用を有効にすると、コードベースのコンテキストを使用して、より質の高い回答を提供します。
コンテキスト認識機能を無効にして Gemini を使用できます。ただし、機能の精度が低下し、ML を活用したコード補完などの一部の機能が無効になります。Android Studio には、[File](macOS では [Android Studio])> [Settings] > [Tools] > [Gemini] を使用して、有効にするコンテキスト認識のレベルを調整するためのプライバシー管理機能が組み込まれています。コードベースの特定の部分でコンテキストの共有をブロックするには、.aiexclude ファイルを使用してコンテキストの共有を構成するをご覧ください。
データは、Google がその提供者を判別できない方法で保存されるため、リクエストに応じて削除することはできません。データは最長で 18 か月間保持されます。詳しくは、Gemini のプライバシーに関するお知らせをご覧ください。
送信および受信するデータ
Gemini に送信されるデータと Gemini から受信されるデータには、次のような種類があります。
- 使用状況の統計情報: Android Studio とその関連ツール(機能の使用方法やリソースの使用量など)の使用方法を指定するデータ。これには、パッケージ名、クラス名、プラグイン構成など、Studio 内部のソフトウェア識別子が含まれます。この共有は、[File](macOS の場合は [Android Studio])> [Settings] > [Appearance & Behavior] > [Data Sharing] で有効または無効にできます。
- プロンプトとレスポンス: Gemini に尋ねる質問(Gemini に送信して分析または完成される入力情報やコードなど)は、プロンプトと呼ばれます。Gemini から受け取る回答やコード補完は、レスポンスと呼ばれます。
- フィードバック シグナル: 高評価と低評価の投票、およびお客様が提供するその他のフィードバック。
- コンテキスト(省略可): Gemini は、コードの断片、ファイル形式、大規模言語モデル(LLM)にコンテキストを提供するために必要なその他の情報など、コードベースから追加情報を送信する場合があります。これにより、Gemini はより高品質で関連性の高い回答を提供できるようになります。また、Gemini は AI コード補完などの試験運用中の追加機能も提供できるようになります。
デベロッパーの選択肢
デフォルトでは、Gemini はエディタ ウィンドウのコードを認識できず、チャットボットのプロンプトと会話履歴のみを使用して応答します。ただし、コードベースのコンテキストを共有して、より質の高い回答を得たり、AI コード補完などの試験運用版機能にアクセスしたりすることは可能です。
Gemini にコンテキストを提供するためにプロジェクトのソースコードの共有を制御するメカニズムは 3 つあります。

全般設定
Studio には、[File](macOS では [Android Studio])> [Settings] > [Tools] > [Gemini] にグローバル オプトイン設定があり、コンテキスト認識を提供するためにソースコードを Gemini サーバーに送信するかどうかを指定できます。

プロジェクトごとに異なるオプションを選択する
Studio の Gemini 設定で [プロジェクトごとに決定を求める] が選択されている場合、各プロジェクトを初めて開いたときに、そのプロジェクトでコンテキスト認識を有効にするかどうかを尋ねるダイアログが表示されます。この設定は、プロジェクトの .idea
ディレクトリに保存されます。

ソースコード レベルの制限事項
プロジェクトのソースコード ディレクトリに .aiexclude
ファイルを追加すると、AI モデルのコンテキストとして使用できるファイルをより細かく制御できます。
.aiexclude 形式の詳細
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は 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,["# Data and privacy\n\n**Gemini in Android Studio is built with your privacy in mind.**\n\nWe know that ensuring the privacy of your code is critical to earning and\nmaintaining the trust of our developers. Gemini in Android Studio is designed\nso that your code never leaves your computer without your consent. If you choose\nto provide code context, Gemini uses that additional context to better\nanswer your questions. You have full control over what data is shared.\n\nAt Google, we believe that trust comes from transparency. This page outlines our\nAI commitments, training philosophy, and technical controls to manage how your\ndata is used.\n\u003e **Our assurances**\n\u003e\n\u003e Gemini is built with Google's\n\u003e [AI Principles](https://ai.google/responsibility/principles/)\n\u003e in mind. These principles describe our commitment to developing AI technology\n\u003e responsibly.\n\u003e\n\u003e Additionally, when you use Gemini in Android Studio, Google handles your\n\u003e data in accordance with our\n\u003e [Privacy Policy](https://policies.google.com/privacy) and the [Gemini\n\u003e Privacy Notice](/studio/gemini/privacy-notice). When you use Gemini in\n\u003e Android Studio for businesses by subscribing to Gemini Code Assist, Google\n\u003e handles your data in accordance with the\n\u003e [Google Cloud Privacy Notice](https://cloud.google.com/terms/cloud-privacy-notice).\n\nData collection and use\n-----------------------\n\nYour code isn't shared with Gemini without your explicit consent. You have the\noption to share your code with Gemini in order to enable context awareness\nfeatures, providing Gemini with the ability to offer project-specific\nresponses.\n\nHere's how your data may be collected and used:\n\n- Your feedback data, such as thumbs up and thumbs down signals, may be used to train Gemini.\n- If you're using Gemini in Android Studio for individuals, the code you explicitly enter into the chat experience may be used to train Gemini. If you opt in to context awareness, the information collected---including code---may be used to improve our products and services, such as machine learning technologies. See our [privacy notice](/studio/gemini/privacy-notice) for more details.\n- If you're using Gemini in Android Studio for businesses, the code you enter into the chat experience is never used to train Gemini. If you opt in to context awareness, the information collected---including code---is never used to improve our products and services, such as machine learning technologies. See the [Google Cloud Privacy Notice](https://cloud.google.com/terms/cloud-privacy-notice) for more details.\n\nIf you opt in to use the AI code completion feature, we use context from your\ncodebase to provide higher quality responses.\n\nYou can use Gemini with context awareness features disabled, with the trade-off\nof less accurate features, and some features disabled such as ML powered code\ncompletion. Android Studio provides built-in privacy controls to adjust the\nlevel of context awareness you want to enable, using **File**\n(**Android Studio** on macOS) \\\u003e **Settings \\\u003e Tools \\\u003e Gemini** . To block context\nsharing for certain portions of your codebase, see [Configure context sharing\nwith .aiexclude files](/studio/gemini/aiexclude).\n\nThe data is stored in a way where Google can't tell who provided it, and it's\nnot possible to delete upon request. The data is retained for up to 18 months.\nFor more information, see the [Gemini Privacy\nNotice](/studio/gemini/privacy-notice).\n\nData submitted and received\n---------------------------\n\nHere are the different types of data submitted to and received from Gemini:\n\n- **Usage statistics:** Data specifying how you use Android Studio and its related tools, such as how you use features and resource usage. This includes software identifiers internal to Studio such as package names, class names, and plugin configuration. You can enable or disable this sharing from **File** (**Android Studio** on macOS) \\\u003e **Settings** \\\u003e **Appearance \\& Behavior** \\\u003e **Data Sharing**.\n- **Prompts and responses:** The questions that you ask Gemini, including any input information or code that you submit to Gemini to analyze or complete, are called prompts. The answers or code completions that you receive from Gemini are called responses.\n- **Feedback signals:** Thumbs up and down votes and any other feedback that you provide.\n- **Context (optional):** Gemini might send additional information from your codebase such as pieces of your code, file types, and any other information that might be necessary to provide context to the Large language Model (LLM). This helps Gemini provide higher quality and relevant responses. This also lets Gemini provide additional experimental capabilities such as AI code completion.\n\nDeveloper choice\n----------------\n\nBy default, Gemini can't see the code in the editor window and only uses the\nprompts and conversation history in the chatbot to respond. However, you can opt\nin to sharing context from your codebase to enable higher quality responses and\naccess to experimental features such as AI code completion.\n\nThere are three mechanisms used to control sharing your project's source code\nfor the purposes of providing context to Gemini:\n\n**Global settings**\n\nStudio's provides a global opt in preference under\n**File** (**Android Studio** on macOS) \\\u003e **Settings \\\u003e Tools \\\u003e Gemini**,\nspecifying whether source code may sent to Gemini servers in order to provide\ncontext awareness.\n\n\u003cbr /\u003e\n\n**Choose different options for each project**\n\nIf \"Ask to decide per project\" is selected in Studio's Gemini settings, a dialog\nis displayed the first time each project is opened asking whether context\nawareness should be enabled for that project. This setting is saved in the\nproject's `.idea` directory.\n\n\u003cbr /\u003e\n\n**Source-code level restrictions**\n\nAdding an `.aiexclude` file into your project's source code directory provides\nmore granular control over which files are eligible to be used as context for AI\nmodels.\n\n[Learn more about the .aiexclude\nformat.](/studio/gemini/aiexclude)\n\n\u003cbr /\u003e"]]