我知道Pebble 2.x有点过时了,但那是我最近得到的手表,我有兴趣在这上面写一个小应用程序。
我无法在我的卵石应用中加载资源文件(图像和字体)。以下是我尝试运行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
}
My Pebble版本:
Pebble Tool v4.0 (active SDK: v2.9)
我还尝试用他们的样本在pebblecloud上创建一个测试应用程序。示例在没有资源的情况下运行良好,但在向项目添加新资源时也失败。有没有解决这个问题?
答案 0 :(得分:0)
显然,Pebble 2.x不喜欢" bitmap"类型。我所要做的就是将资源类型更改为" png"在JSON文件中:
"media": [
{
"type": "png",
"name": "IMAGE_BT_ICON",
"file": "bt-icon.png"
}
]
OMG = A = ..
对于CloudPebble,资源类型的下拉列表似乎没有出现,它似乎默认选择了Bitmap。也许它将在不久的将来修复idk。