as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
Class providing various APIs for application asset resolution. This class’s APIs are used to obtain strings, numbers, and asset paths. Asset resolution uses device configuration qualifier values such as locale, day/night mode to determine the best possible asset for any combination of qualifiers.

Constructors

new AssetResolver()

new AssetResolver(): AssetResolver

Returns

AssetResolver

Methods

getMajorVersion()

static getMajorVersion(): number
Get the major version number. The major version number.

Returns

number

getMinorVersion()

static getMinorVersion(): number
Get the minor version number. The minor version number.

Returns

number

getNumber()

static getNumber(id: string, configuration?: AssetResolverTypes.AssetConfiguration | undefined): number
Gets the number whose identifier is passed in based on the current system configuration qualifiers or based on the provided configuration qualifiers.

Parameters

id
string The name of the number being queried.
configuration?
AssetResolverTypes.AssetConfiguration | undefined Optional configuration qualifiers to use in asset resolution. If these aren’t provided, system configuration qualifiers will be used.

Throws

  • Error If AssetResolver execution fails, an Error is thrown.

Returns

number number

getPatchVersion()

static getPatchVersion(): number
Get the patch version number. The patch version number.

Returns

number

getString()

static getString(id: string, configuration?: AssetResolverTypes.AssetConfiguration | undefined): AssetResolverTypes.StringValue
Gets the string and direction whose identifier is passed in based on the current system configuration qualifiers or based on the provided configuration qualifiers.

Parameters

id
string The name of the string being queried.
configuration?
AssetResolverTypes.AssetConfiguration | undefined Optional configuration qualifiers to use in asset resolution. If these aren’t provided, system configuration qualifiers will be used.

Throws

  • Error If AssetResolver execution fails, an Error is thrown.

Returns

AssetResolverTypes.StringValue AssetResolverTypes.StringValue
最后修改于 2026年8月25日