我知道鹅卵石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
}我的卵石版本:
Pebble Tool v4.0 (active SDK: v2.9)我还试着用他们的样本在pebblec头上创建一个测试应用程序。示例在没有资源的情况下运行良好,但当我向项目添加新资源时也会失败。这件事有办法解决吗?
发布于 2016-01-04 03:08:13
显然,鹅卵石2.x不喜欢“位图”类型。我所要做的就是将JSON文件中的资源类型更改为"png“:
"media": [
{
"type": "png",
"name": "IMAGE_BT_ICON",
"file": "bt-icon.png"
}
]OMG =A=.
至于CloudPebble,资源类型的下拉列表似乎没有显示,它似乎默认选择位图。也许它会在不久的将来修复。
https://stackoverflow.com/questions/34583197
复制相似问题