运行
cd ~/kivy-examples/demo/kivycatalog/
kivydev@kivydev-VirtualBox:~/kivy-examples/demo/kivycatalog$ python main.py
产生如下错误:
File "/usr/local/lib/python2.7/dist-packages/kivy/uix/label.py", line 372, in texture_update
self._label.refresh()
File "/usr/local/lib/python2.7/dist-packages/kivy/core/text/__init__.py", line 667, in refresh
self.resolve_font_name()
File "/usr/local/lib/python2.7/dist-packages/kivy/core/text/__init__.py", line 285, in resolve_font_name
raise IOError('Label: File %r not found' % fontname)
IOError: Label: File 'data/fonts/DroidSansMono.ttf' not found
查找DroidSansMono.ttf
find / -name DroidSansMono.ttf 2>/dev/null
/home/kivydev/andr/android-sdk-linux/platforms/android-21/data/fonts/DroidSansMono.ttf
……
不是没有,只是在错误的地方
拷贝过去就好了
sudo cp /home/kivydev/andr/android-sdk-linux/platforms/android-21/data/fonts/DroidSansMono.ttf /usr/local/lib/python2.7/dist-packages/kivy/data/fonts