2016-05-31 23 views
5

我工作的一個離子2測試版(最新版本)的項目方法。 該應用程序運行在Web客戶端沒有任何錯誤。 但是當我試圖模仿我得到一個白色的屏幕(死亡白色屏幕)。 有沒有錯誤記錄adb logcat當我模仿離子應用它拋出類型錯誤:不能調用未定義

所以試圖模仿現場重裝應用程序。 (如提到的here)。

當我執行命令ionic emulate android -l -c

我得到這個錯誤:

Error happened TypeError: Can't call method on undefined 
    at TypeError (native) 
    at module.exports (D:\ionicApp\node_modules\core-js\modules\_defined.js:3:28) 
    at createHTML (D:\ionicApp\node_modules\core-js\modules\_string-html.js:7:19) 
    at bold (D:\ionicApp\node_modules\core-js\modules\es6.string.bold.js:5:12) 
    at cb (C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\winston\lib\winston\logger.js:206:7) 
    at done (C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\winston\node_modules\async\lib\async.js:167:19) 
    at C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\winston\node_modules\async\lib\async.js:40:16 
    at C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\winston\lib\winston\logger.js:193:9 
    at [object Object].Console.log (C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\winston\lib\winston\transports\console.js:127:3) 
    at emit (C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\winston\lib\winston\logger.js:186:17) 
    at C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\winston\node_modules\async\lib\async.js:157:13 
    at _each (C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\winston\node_modules\async\lib\async.js:57:9) 
    at Object.async.each (C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\winston\node_modules\async\lib\async.js:156:9) 
    at [object Object].Logger.log (C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\winston\lib\winston\logger.js:214:9) 
    at [object Object].target.(anonymous function) [as info] (C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\winston\lib\winston\common.js:54:18) 
    at Object.IonicTask.setupLiveReload (C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\lib\ionic\cordova.js:338:7) 
    at C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\lib\ionic\cordova.js:104:21 
    at _fulfilled (C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:787:54) 
    at self.promiseDispatch.done (C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:816:30) 
    at Promise.promise.promiseDispatch (C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:749:13) 
    at C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:509:49 
    at flush (C:\Users\User1\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:108:17) 
    at nextTickCallbackWith0Args (node.js:456:9) 
    at process._tickCallback (node.js:385:13) 

有任何人遇到這樣,有什麼是您的解決方案? 參考:https://forum.ionicframework.com/t/emulate-run-with-livereload-not-working/48330

+0

我在模擬自己(在iPhone上)有一些問題,但我解決了它通過使用運行''關鍵字來代替:''離子運行android'' – John

+0

@約翰我嘗試使用'離子運行android',但它不起作用 – tymspy

+0

您是否將android添加到您的平臺? ''離子平臺添加android'' – John

回答

0

爲了解決我已經做了以下的問題。

  1. 升級/降級到科爾多瓦6.0.0版
  2. 升級/降級到離子版本2.0.0-beta.25
  3. 離子狀態的復位
  4. 離子平臺的android刪除
  5. 離子平臺添加安卓
  6. 離子運行的Android

它可以作爲今天的....

相關問題