pub struct Aapt2Optimize { /* private fields */ }
Expand description

Preforms resource optimizations on an APK

Implementations

Initialize aapt2 optimize then specifies path to the aapt2 link output APK and Path to the output directory (for splits)

Specifies path to XML configuration file

Print the multi APK artifacts and exit

Comma separated list of the screen densities that the APK will be optimized for. All the resources that would be unused on devices of the given densities will be removed from the APK

Path to the resources.cfg file containing the list of resources and directives to each resource. Format: type/resource_name#[directive][,directive]

Comma separated list of configurations to include. The default is all configurations

Split resources matching a set of configs out to a Split APK. Syntax:

`path/to/output.apk;<config>[,<config>[...]].`

On Windows, use a semicolon ; separator instead

Comma separated list of artifacts to keep. If none are specified, all artifacts will be kept

Enables encoding sparse entries using a binary search tree. This decreases APK size at the cost of resource retrieval performance

Collapses resource names to a single value in the key string pool. Resources can be exempted using the no_collapse directive in a file specified by --resources-config-path

Shortens the paths of resources inside the APK

Path to output the map of old resource paths to shortened paths

Enables verbose logging

Displays this help menu

Executes aapt2 optimize with arguments

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.