我有一个相当简单的 APL 小部件,但是,当我尝试将所述小部件安装到我的 Echo Show 10 上时,会出现一个标题为“安装小部件时出现问题”的弹出窗口,并显示消息“您安装的小部件中存在问题”请求”后跟时间戳。作为参考,这里是 APL:
{
"type": "APL",
"version": "2023.3",
"license": "Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: LicenseRef-.amazon.com.-AmznSL-1.0\nLicensed under the Amazon Software License http://aws.amazon.com/asl/",
"import": [
{
"name": "alexa-layouts",
"version": "1.7.0"
}
],
"extensions": [
{
"uri": "alexaext:datastore:10",
"name": "DataStore"
}
],
"settings": {
"DataStore": {
"dataBindings": [
{
"namespace": "widget_bin_datastore",
"key": "binData",
"dataBindingName": "dsBinData",
"dataType": "OBJECT"
}
]
}
},
"onDisplayStateChange": [
{
"type": "Sequential",
"sequencer": "displaySequencer",
"commands": [
{
"type": "SendEvent",
"arguments": [
"${event.displayState}"
],
"flags": {
"interactionMode": "STANDARD"
}
}
]
}
],
"mainTemplate": {
"parameters": [
"payload"
],
"items": [
{
"type": "AlexaPhoto",
"headerTitle": "Salford Bins",
"imageSource": "https://i.imgur.com/B90CXAo.png",
"primaryText": "${payload.dsBinData.bin_text}",
"secondaryText": "${payload.dsBinData.postcode}",
"buttonText": "Refresh",
"imageHideScrim": true,
"theme": "dark",
"primaryAction": [
{
"type": "SendEvent",
"arguments": [
"widgetRefresh"
]
}
]
}
]
}
}
尝试安装时查看您的 cloudwatch 日志。听起来您收到了一个UsagesInstalled 请求,但没有正确处理它。或者日志可能会显示一些其他错误,例如InstallationError 请求。
这只适用于您启用了 Alexa.DataStore.PackageManager 接口的情况!