簡體   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