Subchapter 5.1
references/android_setup.mdMarkdown2 KBView on GitHub
if you haven’t already created an android application, create one.
If you haven’t already created a project, create a new cloud project with a
unique ID:
npx -y firebase-tools@latest projects:create <UNIQUE_PROJECT_ID> --display-name '<DISPLAY_NAME>'
Example:
npx -y firebase-tools@latest projects:create my-cool-app-20260330 --display-name 'MyCoolApp'
Link your Android app module (package name) to your project. Notice that the
display name is passed as a positional argument at the end:
npx -y firebase-tools@latest apps:create ANDROID '<APP_DISPLAY_NAME>' --package-name '<PACKAGE_NAME>' --project <PROJECT_ID>
Example:
npx -y firebase-tools@latest apps:create ANDROID 'MyApplication' --package-name 'com.example.myapplication' --project my-cool-app-20260330
Validate that the project was created and registered successfully:
npx -y firebase-tools@latest projects:list
npx -y firebase-tools@latest apps:list --project <PROJECT_ID>