プロジェクトの概要
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Android Studio の Platform プロジェクトには、ソースコードやアセットから、テストコード、ビルド構成にいたるまで、AOSP コードベースのワークスペースを定義するものがすべて含まれています。
新しいプロジェクトを開始すると、Android Studio for Platform はすべてのファイルの必要な構造を作成し、Android Studio の [Project] ウィンドウに表示します。このウィンドウを開くには、[View] > [Tool Windows] > [Project] を選択します。
このページでは、プロジェクト内の主なコンポーネントの概要を説明します。
プロジェクトの管理(asfp-config.json
)
asfp-config.json
は、プロジェクトのすべての構成オプションを含む JSON ファイルです。プロジェクト ディレクトリのルートにあります。
モジュールやランチの目標を編集する
プロジェクト作成時の初期モジュール パスは asfp-config.json
に保存されます。このファイルにモジュールを追加(または削除)して保存するだけで、同期を求める通知バルーンが表示されます。
"modulePaths" : [
"frameworks/base",
"packages/apps/Settings",
"add additional module paths here..."
],
ネイティブ サポートを無効にする
プロジェクトのネイティブ サポートをカスタマイズするには:
"nativeConfig" : {
"excludePaths" : ["*"],
"excludeGenPaths" : ["*"]
}
excludePaths
: ここに指定されたすべてのパスは、ネイティブ サポートから完全に除外されます。
excludeGenPaths
: ここにあるすべてのパスには、ネイティブ生成ソースがありません。
ワイルドカード(*
)記号を使用して、リポジトリ チェックアウトのすべてのパスを指定できます。
同期パラメータ
同期は、ユーザー定義のビルド(m
コマンド)フラグと環境変数を受け入れます。これらは、asfp-config.json
で次のように構成できます。
"syncConfig" : {
"environmentVars" : {
"a": "1",
"b": "2"
},
"buildFlags" : [
"--u=v",
"-x"
]
}
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-09-04 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-09-04 UTC。"],[],[],null,["A project in Android Studio for Platform contains everything that defines\nyour workspace for your AOSP codebase, from source code and assets to test\ncode and build configurations.\n\nWhen you start a new project, Android Studio for Platform creates the necessary\nstructure for all your files and makes them visible in the Project window in\nAndroid Studio. To open the window, select View \\\u003e Tool Windows \\\u003e Project.\n\nThis page provides an overview of the key components inside your project.\n\nManaging your project (`asfp-config.json`)\n\n`asfp-config.json` is a JSON file that contains all the configuration options\nfor your project. It is located in the root of your project directory.\n\nEditing modules or your lunch target\n\nYour initial module paths from project creation are stored in\n`asfp-config.json`. Simply add (or remove) modules to this file and save,\nwhich should pop up a notification balloon prompting you to sync. \n\n \"modulePaths\" : [\n \"frameworks/base\",\n \"packages/apps/Settings\",\n \"add additional module paths here...\"\n ],\n\nDisabling native support\n\nTo customize native support for your project: \n\n \"nativeConfig\" : {\n \"excludePaths\" : [\"*\"],\n \"excludeGenPaths\" : [\"*\"]\n }\n\n- `excludePaths`: All paths here will be completely excluded from native support.\n- `excludeGenPaths`: All paths here won't have native generated sources.\n\nNote that you can use the wildcard (**`*`**) symbol to indicate all paths\nin the repo checkout.\n\nSync parameters\n\nSync accepts user-defined build (`m` command) flags and environment\nvariables. These can be configured in `asfp-config.json` via: \n\n \"syncConfig\" : {\n \"environmentVars\" : {\n \"a\": \"1\",\n \"b\": \"2\"\n },\n \"buildFlags\" : [\n \"--u=v\",\n \"-x\"\n ]\n }"]]