A project in Android Studio for Platform contains everything that defines your workspace for your AOSP codebase, from source code and assets to test code and build configurations.
When you start a new project, Android Studio for Platform creates the necessary structure for all your files and makes them visible in the Project window in Android Studio. To open the window, select View > Tool Windows > Project.
This page provides an overview of the key components inside your project.
Managing your project (asfp-config.json
)
asfp-config.json
is a JSON file that contains all the configuration options
for your project. It is located in the root of your project directory.
Editing modules or your lunch target
Your initial module paths from project creation are stored in
asfp-config.json
. Simply add (or remove) modules to this file and save,
which should pop up a notification balloon prompting you to sync.
"modulePaths" : [
"frameworks/base",
"packages/apps/Settings",
"add additional module paths here..."
],
Disabling native support
To customize native support for your project:
"nativeConfig" : {
"excludePaths" : ["*"],
"excludeGenPaths" : ["*"]
}
excludePaths
: All paths here will be completely excluded from native support.excludeGenPaths
: All paths here won't have native generated sources.
Note that you can use the wildcard (*
) symbol to indicate all paths
in the repo checkout.
Sync parameters
Sync accepts user-defined build (m
command) flags and environment
variables. These can be configured in asfp-config.json
via:
"syncConfig" : {
"environmentVars" : {
"a": "1",
"b": "2"
},
"buildFlags" : [
"--u=v",
"-x"
]
}