如何解决OSError:标签:找不到文件“Gilroy-light.ttf”
我正在尝试在我的应用程序中添加字体文件,但它正在显示
OSError: Label: File 'Gilroy-light.ttf' not found
我在 include ext 中添加了 .ttf
。行,但随后也显示此错误
包括分机。行:
source.include_exts = py,png,jpg,kv,atlas,ttf
请帮我解决这个问题..
解决方法
没有很多信息可以给出正确的答案。但这正是我认为出错的地方。
答案取决于您是在系统上还是在安卓设备上执行程序。但是,由于您已从 buildozer.spec 文件中添加了一行,我将假设您要么尝试在 buildozer 中编译程序,但遇到该错误,要么在手机上运行该应用程序时遇到此错误。>
在这种情况下,您需要将实际字体文件复制到您的工作目录(您的 PushNotification.configure({
// (optional) Called when Token is generated (iOS and Android)
onRegister: function(token) {
console.log('onRegister token:',token);
},// (required) Called when a remote is received or opened,or local notification is opened
onNotification: function(notification) {
console.log('onNotification:',notification);
notification.finish(PushNotificationIOS.FetchResult.NoData);
},// Should the initial notification be popped automatically
popInitialNotification: true,requestPermissions: true,});
userNowInactive = () => {
this.showNotification();
}
showNotification = () => {
PushNotification.localNotification({
//ios and android properties
title: 'Face2Face: Beacon Timer Expired',message: 'Perhaps set your beacon timer for another hour?',playSound: true,soundName: 'sound.mp3',//android only properties
channelId: 'your-channel-id',autoCancel: true,// largeIcon: 'ic_launcher',// smallIcon: 'ic_launcher',bigText: 'Face2Face: Beacon Timer Expired',subText: 'Perhaps set your beacon timer for another hour?',vibrate: true,vibration: 300,priority: 'high',//ios only properties...is there any?
});
};
文件所在的目录。另外我建议您只使用一个扩展名。要么使用 main.py
输入或.ttf
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。