If you distribute your app as an Android App Bundle (AAB), they contain all required files and so can be uploaded in a single command.
For installation instructions for the BugSnag CLI, please see our Installation guide.
The android-aab
command extracts a given .aab
file and uploads any NDK symbol or Proguard mapping files to the appropriate upload API. See the upload android-ndk
and upload android-proguard
commands for details.
In addition to the symbol and mapping files, the command extracts version and build information, including your BugSnag API key, required for the upload from your app’s manifest file (AndroidManifest.xml
). These values can be overridden, or provided entirely, by command line options.
The simplest way to run the command is to provide the path to the .aab
file:
$ bugsnag-cli upload android-aab app/build/outputs/bundle/release/app-release.aab
--api-key
)The BugSnag API key for the application.
You can find your API key in Project Settings from your BugSnag dashboard.
Default: the value of com.bugsnag.android.API_KEY
in your app’s manifest file, if found.
--application-id
)A unique application ID, usually the package name, of the application.
Default: the value of Package
in your app’s manifest file, if found.
--build-uuid
)A unique identifier for this build of the application.
This is only required if you have multiple mapping files with the same applicationId
and versionCode
. This same ID must also be set in the BugSnag configuration in your app, so that errors match the uploaded build. See Unique build identifiers for more information.
--dry-run
)Performs a dry-run of the command without sending any information to BugSnag.
--fail-on-upload-error
)Stops the upload when a file fails to upload successfully.
--log-level
)Sets the level of logging to debug, info, warn or fatal.
Default: info
.
--no-build-uuid
)Prevents the automatically generated build UUID being uploaded with the build.
--overwrite
)Whether to ignore and overwrite existing uploads with same identifier, rather than failing if a matching file exists.
--port
)The port number for the BugSnag upload server.
Default: 443
.
--project-root
)The path to strip from the beginning of source file names referenced in stacktraces on the BugSnag dashboard.
Default: the root directory if the command has detected one, otherwise it’s empty.
--retries
)The number of retry attempts before failing an upload request.
Default: 0
.
--timeout
)The number of seconds to wait before failing an upload request.
Default: 300
.
--upload-api-root-url
)The upload server hostname, optionally containing port number.
For use in BugSnag On-premise configurations. The command will append the appropriate path to access the correct upload endpoint.
Default: https://upload.bugsnag.com
.
--verbose
)Sets the level of the logging to its highest.
This is the equivalent of setting the log level to debug
.
--version-code
)The version code of this build of the application.
Default: the value of VersionCode
in your app’s manifest file, if found.
--version-name
)The version of the application.
Default: the value of VersionName
in your app’s manifest file, if found.