繁体   English   中英

main.js中的Gtk.init错误

[英]Error with Gtk.init in main.js

我正在关注本教程 但是,当我尝试运行它时,我总是收到此错误;

    JS ERROR: !!!   Exception was: Error: Expected type utf8 for Argument 'argv' but got type 'number' (nil)
    JS ERROR: !!!     message = '"Expected type utf8 for Argument 'argv' but got type 'number' (nil)"'
    JS ERROR: !!!     fileName = '"main.js"'
    JS ERROR: !!!     lineNumber = '146'
    JS ERROR: !!!     stack = '"@main.js:146
"'
Error: Expected type utf8 for Argument 'argv' but got type 'number' (nil)

我真的不知道出什么问题了。

Gtk.init(0,null);

此处使用的代码可用。

是。 这是一个错误。 查看带有修补程序的此消息: https : //mail.gnome.org/archives/commits-list/2012-February/msg10213.html

您应该更改Gtk.init(0,null); 通过Gtk.init(null, null);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM