2013-11-14 182 views
4

它產生以下輸出:錯誤時 「科爾多瓦模擬blackberry10」

Generating config.xml from defaults for platform "blackberry10" 
    Preparing blackberry10 project 
    Running on emulator for platform "blackberry10" via command "cmd" /c "project_root"\platforms\blackberry10\cordova\run --emulator 
    [Error: An error occurred while emulating/deploying the blackberry10 project. 
    fs.js:418 
     binding.open(pathModule._makeLong(path), 
      ^
    TypeError: path must be a string 
     at Object.fs.open (fs.js:418:11) 
     at Object.fs.readFile (fs.js:206:6) 
     at _self.findConnectedSimulator ("project_root"\PLATFO~1\BLACKB~1\cordova\lib\target-utils.js:182:12) 
     at Object.async.series.ip ("project_root"\PLATFO~1\BLACKB~1\cordova\lib\run:111:21) 
     at "project_root"\PLATFO~1\BLACKB~1\cordova\node_modules\async\lib\async.js:561:25 
     at iterate ("project_root"\PLATFO~1\BLACKB~1\cordova\node_modules\async\lib\async.js:131:13) 
     at Object.async.eachSeries ("project_root"\PLATFO~1\BLACKB~1\cordova\node_modules\async\lib\async.js:147:9) 
     at Object.async.series ("project_root"\PLATFO~1\BLACKB~1\cordova\node_modules\async\lib\async.js:560:19) 
     at getTargetName ("project_root"\PLATFO~1\BLACKB~1\cordova\lib\run:108:15) 
     at fn ("project_root"\PLATFO~1\BLACKB~1\cordova\node_modules\async\lib\async.js:579:34) 
    ] 

cordova build blackberry10正常工作。仿真器也正常工作。

+0

同樣的問題。我想沒有人會這樣做。 –

+0

@ MaximV.Pavlov我已經發布解決方案 – janot

回答

7

由於bryanhiggins proposed

platforms\blackberry10\cordova\target add mysim <ip address> -t simulator --pin <simulator PIN> 
cordova emulate blackberry10 --target=mysim 

貌似平淡cordova build blackberry10不工作,因爲在科爾多瓦的bug。我會更新答案,以防萬一找到更好的解決方案或者它將被修復。

+1

在我的情況下,它看起來像* *必須*在連接到仿真器時再次傳遞引腳,例如:'cordova emulate blackberry10 --devicepass 123456' – Aras

+1

@Aras so,pin或devicepass?我不確定,但也許你只是在你的模擬器上設置了設備密碼? – janot

+1

我不得不使用'devicepass',我認爲這是我在模擬器內啓用開發模式時輸入的密碼。我不明白*爲什麼*這是必要的,但我的情況是我設法連接到模擬器的唯一方法。我認爲這是一個與這裏所描述的不同的問題。 – Aras