【问题标题】:When building a pebble app I'm getting a error I can't understand构建 pebble 应用程序时出现我无法理解的错误
【发布时间】:2015-01-19 20:23:36
【问题描述】:

我正在尝试从适用于 mac 的 SDK 构建我的 pebble 应用程序,但它不断给我以下错误。代码本身符合 cloud pebble 但由于某种原因给了我这个我无法理解的错误。

Setting top to                           : 

/Users/PJ/Documents/GitHub/simple-for-pebble 
Setting out to                           : /Users/PJ/Documents/GitHub/simple-for-pebble/build 
Checking for program gcc,cc              : arm-none-eabi-gcc 
Checking for program ar                  : arm-none-eabi-ar 
Found Pebble SDK in          : /Users/PJ/pebble-dev/PebbleSDK-2.8.1/Pebble
'configure' finished successfully (0.082s)
Waf: Entering directory `/Users/PJ/Documents/GitHub/simple-for-pebble/build'
[ 1/15] appinfo.auto.c: appinfo.json -> build/appinfo.auto.c
[ 2/15] Arvo-Bold.ttf.TIME_45.pfo: resources/fonts/Arvo-Bold.ttf ../../../pebble-dev/PebbleSDK-2.8.1/Pebble/tools/font/fontgen.py -> build/resources/fonts/Arvo-Bold.ttf.TIME_45.pfo
[ 3/15] Arvo-Regular.ttf.DATE_22.pfo: resources/fonts/Arvo-Regular.ttf ../../../pebble-dev/PebbleSDK-2.8.1/Pebble/tools/font/fontgen.py -> build/resources/fonts/Arvo-Regular.ttf.DATE_22.pfo
Traceback (most recent call last):
  File "/Users/PJ/pebble-dev/PebbleSDK-2.8.1/Pebble/tools/font/fontgen.py", line 4, in <module>
    import freetype
  File "/Users/PJ/pebble-dev/PebbleSDK-current/.env/lib/python2.7/site-packages/freetype/__init__.py", line 38, in <module>
    raise RuntimeError, 'Freetype library not found'
RuntimeError: Freetype library not found
Traceback (most recent call last):
  File "/Users/PJ/pebble-dev/PebbleSDK-2.8.1/Pebble/tools/font/fontgen.py", line 4, in <module>
    import freetype
  File "/Users/PJ/pebble-dev/PebbleSDK-current/.env/lib/python2.7/site-packages/freetype/__init__.py", line 38, in <module>
    raise RuntimeError, 'Freetype library not found'
RuntimeError: Freetype library not found
Waf: Leaving directory `/Users/PJ/Documents/GitHub/simple-for-pebble/build'
Build failed
 -> task in 'Arvo-Bold.ttf.TIME_45.pfo' failed (exit status 1): 
    {task 4471793616: Arvo-Bold.ttf.TIME_45.pfo Arvo-Bold.ttf,fontgen.py -> Arvo-Bold.ttf.TIME_45.pfo}
" python '/Users/PJ/pebble-dev/PebbleSDK-2.8.1/Pebble/tools/font/fontgen.py' pfo  45 --tracking -1   --legacy '/Users/PJ/Documents/GitHub/simple-for-pebble/resources/fonts/Arvo-Bold.ttf' '/Users/PJ/Documents/GitHub/simple-for-pebble/build/resources/fonts/Arvo-Bold.ttf.TIME_45.pfo' "
 -> task in 'Arvo-Regular.ttf.DATE_22.pfo' failed (exit status 1): 
    {task 4471793936: Arvo-Regular.ttf.DATE_22.pfo Arvo-Regular.ttf,fontgen.py -> Arvo-Regular.ttf.DATE_22.pfo}
" python '/Users/PJ/pebble-dev/PebbleSDK-2.8.1/Pebble/tools/font/fontgen.py' pfo  22    --legacy '/Users/PJ/Documents/GitHub/simple-for-pebble/resources/fonts/Arvo-Regular.ttf' '/Users/PJ/Documents/GitHub/simple-for-pebble/build/resources/fonts/Arvo-Regular.ttf.DATE_22.pfo' "
[ERROR   ] A compilation error occurred

【问题讨论】:

  • 混乱中的错误在以“RuntimeError:”开头的行中给出。该错误表明脚本在您的系统上找不到 Freetype 库。要修复它,我猜你必须下载并安装 Freetype 库。
  • 以后,请尽量让你的问题标题更有意义。

标签: c json pebble-watch pebble-sdk


【解决方案1】:

Simple-for-Pebble 使用自定义字体,因此您需要安装 Freetype 以便 Pebble SDK 能够处理 TTF 文件。

Pebble 开发者网站 (https://developer.getpebble.com/sdk/install/mac/#pebble-sdk-fonts-and-freetype) 上提供了有关如何执行此操作的说明,但安装它的最快方法是使用 Homebrew

brew install freetype

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-06-15
    • 1970-01-01
    • 2022-12-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多