Pebble SDK 2.x 无法加载资源
Pebble sdk 2.x unable to load resource
我知道 pebble 2.x 有点过时,但那是我最近得到的手表,有兴趣在上面写一个小应用程序。
我无法在我的 Pebble 应用程序中加载资源文件(图像和字体)。以下是我尝试 运行 pebble build
时的错误消息:
Setting top to : /home/mixi/Documents/pebble-dev/helloworld
Setting out to : /home/mixi/Documents/pebble-dev/helloworld/build
Checking for program gcc,cc : arm-none-eabi-gcc
Checking for program ar : arm-none-eabi-ar
Found Pebble SDK in : /home/mixi/.pebble-sdk/SDKs/current/sdk-core/pebble/aplite
'configure' finished successfully (0.220s)
Waf: Entering directory `/home/mixi/Documents/pebble-dev/helloworld/build'
Error Generating Resources: File: bt-icon.png has specified invalid type: bitmap
Must be one of (raw, png, png-trans, font)
Generating resources failed
我的appinfo.json
:
{
"uuid": "93c49fe2-0b1e-44b8-8fff-22d9c87adab9",
"shortName": "helloworld",
"longName": "helloworld",
"companyName": "MakeAwesomeHappen",
"versionLabel": "1.0",
"sdkVersion": "2.9",
"targetPlatforms": ["aplite", "basalt", "chalk"],
"watchapp": {
"watchface": true
},
"appKeys": {
"dummy": 0
},
"resources": {
"media": [
{
"type": "bitmap",
"name": "IMAGE_BT_ICON",
"file": "bt-icon.png"
}
]
},
"versionCode": 1
}
我的 Pebble 版本:
Pebble Tool v4.0 (active SDK: v2.9)
我还尝试使用他们的示例在 pebblecloud 上创建一个测试应用程序。示例 运行 在没有资源的情况下很好,但是当我向项目添加新资源时也会失败。有解决办法吗?
显然,pebble 2.x 不喜欢 "bitmap" 类型。我所要做的就是在 JSON 文件中将资源类型更改为 "png":
"media": [
{
"type": "png",
"name": "IMAGE_BT_ICON",
"file": "bt-icon.png"
}
]
我的天啊=A=..
至于 CloudPebble,似乎没有显示资源类型的下拉列表,默认情况下似乎是 select 位图。也许它会在不久的将来被修复。
我知道 pebble 2.x 有点过时,但那是我最近得到的手表,有兴趣在上面写一个小应用程序。
我无法在我的 Pebble 应用程序中加载资源文件(图像和字体)。以下是我尝试 运行 pebble build
时的错误消息:
Setting top to : /home/mixi/Documents/pebble-dev/helloworld
Setting out to : /home/mixi/Documents/pebble-dev/helloworld/build
Checking for program gcc,cc : arm-none-eabi-gcc
Checking for program ar : arm-none-eabi-ar
Found Pebble SDK in : /home/mixi/.pebble-sdk/SDKs/current/sdk-core/pebble/aplite
'configure' finished successfully (0.220s)
Waf: Entering directory `/home/mixi/Documents/pebble-dev/helloworld/build'
Error Generating Resources: File: bt-icon.png has specified invalid type: bitmap
Must be one of (raw, png, png-trans, font)
Generating resources failed
我的appinfo.json
:
{
"uuid": "93c49fe2-0b1e-44b8-8fff-22d9c87adab9",
"shortName": "helloworld",
"longName": "helloworld",
"companyName": "MakeAwesomeHappen",
"versionLabel": "1.0",
"sdkVersion": "2.9",
"targetPlatforms": ["aplite", "basalt", "chalk"],
"watchapp": {
"watchface": true
},
"appKeys": {
"dummy": 0
},
"resources": {
"media": [
{
"type": "bitmap",
"name": "IMAGE_BT_ICON",
"file": "bt-icon.png"
}
]
},
"versionCode": 1
}
我的 Pebble 版本:
Pebble Tool v4.0 (active SDK: v2.9)
我还尝试使用他们的示例在 pebblecloud 上创建一个测试应用程序。示例 运行 在没有资源的情况下很好,但是当我向项目添加新资源时也会失败。有解决办法吗?
显然,pebble 2.x 不喜欢 "bitmap" 类型。我所要做的就是在 JSON 文件中将资源类型更改为 "png":
"media": [
{
"type": "png",
"name": "IMAGE_BT_ICON",
"file": "bt-icon.png"
}
]
我的天啊=A=..
至于 CloudPebble,似乎没有显示资源类型的下拉列表,默认情况下似乎是 select 位图。也许它会在不久的将来被修复。