我已經通過「添加新的」按鈕添加的資源旁邊的資源,然後在我的代碼,我執行卵石應用程序無法識別資源的圖像
image_logo = gbitmap_create_with_resource(RESOURCE_ID_IMAGE_APP_LOGO_LONG);
,但我得到以下編譯錯誤:
../src/main.c: In function 'main':
../src/main.c:120:44: error: 'RESOURCE_ID_IMAGE_APP_LOGO_LONG' undeclared (first use in this function)
../src/main.c:120:44: note: each undeclared identifier is reported only once for each function it appears in
Waf: Leaving directory `/tmp/tmpGhVqKn/build'
Build failed
這是我的appinfo.json文件包含的內容,我從應用程序的設置部分下載了這個文件。您可以看到圖像已添加了相同的標識符。
{
"appKeys": {
"agency": 0,
"cleanStops": 11,
"error": 10,
"eta": 8,
"getEta": 9,
"getRoutes": 5,
"index": 1,
"refresh": 4,
"routeId": 6,
"routeName": 7,
"stopId": 2,
"stopName": 3
},
"capabilities": [
"location",
"configurable"
],
"companyName": "[email protected]",
"longName": "DoublePebble",
"projectType": "native",
"resources": {
"media": [
{
"file": "images/doublemap_menu_icon.png",
"menuIcon": true,
"name": "IMAGE_DOUBLEMAP_MENU_ICON",
"type": "png"
},
{
"file": "images/spoon_long_med-2.png",
"name": "RESOURCE_ID_IMAGE_APP_LOGO_LONG",
"type": "png"
}
]
},
"sdkVersion": "3",
"shortName": "DoublePebble",
"targetPlatforms": [
"aplite",
"basalt"
],
"uuid": "409b7111-c0bf-43bd-a90c-8a44c33d1eb3",
"versionLabel": "1.0",
"watchapp": {
"watchface": false
}
}