setUninstallVersion

Sets UninstallParameters.uninstallVersion, including its fallback policy.

When exact targeting is available, uninstallerType is normalized to UninstallerType.PACKAGE_INSTALLER_BASED. Otherwise, VersionedUninstallPolicy.ALLOW_NAME_ONLY preserves the existing backend selection rules.

Parameters

uninstallVersion

the version to target and its fallback policy.

Throws

if an exact target is requested with VersionedUninstallPolicy.STRICT on API level < 26, or its code exceeds Int.MAX_VALUE on API levels 26–27. The builder remains unchanged when validation fails.