【问题标题】:ripple.js giving error on running the application on Visual Studioipple.js 在 Visual Studio 上运行应用程序时出错
【发布时间】:2016-01-17 03:40:35
【问题描述】:

我正在使用波纹运行我的应用程序,它在转到我的应用程序之前给出了 2 个错误提示,并且在 javascript 中并行,它给出了以下错误。请找到屏幕截图作为错误提示。我正在使用 Visual Studio 15 社区版运行我的代码。我还尝试使用 ionic serve 编译我的代码。

Ripple :: Environment Warming Up (Tea. Earl Grey. Hot.)
ripple.js (37,13091)
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check     http://xhr.spec.whatwg.org/.
ripple.js (50,29364)
Failed to load resource: the server responded with a status of 404 (Not Found)
ripple.js (50,29364)
cordova :: Initialization Finished (Make it so.)
ripple.js (37,13091)
HTML1300: Navigation occurred
index.html
Current window: http://localhost:4400/index.html
missing exec:Keyboard.init
ripple.js (40,29735)

ripple.js (40,29783)
   [ ]

TypeError: Cannot read property 'init' of undefined
ripple.js (40,29801)
   TypeError: Cannot read property 'init' of undefined ...

TypeError: Cannot read property 'init' of undefined
at module.exports.exec (http://localhost:4400/ripple/assets/ripple.js:40:29690)
at null.<anonymous> (http://localhost:4400/plugins/ionic-plugin-keyboard/www/android/keyboard.js:36:5)
at Channel.fire (http://localhost:4400/cordova.js:820:23)
at http://localhost:4400/cordova.js:1275:28
at f (http://localhost:4400/cordova.js:692:33)
at Channel.fire (http://localhost:4400/cordova.js:820:23)
at http://localhost:4400/cordova.js:1262:32
at onScriptLoadingComplete (http://localhost:4400/cordova.js:1731:5)
at scriptLoadedCallback (http://localhost:4400/cordova.js:1748:13)
at HTMLScriptElement.<anonymous> (http://localhost:4400/cordova.js:1702:17)
ripple.js (40,29816)
Keyboard
ripple.js (48,14754)
init
ripple.js (48,14775)
missing exec:Keyboard.close
ripple.js (40,29735)

ripple.js (40,29783)
[ ]

TypeError: Cannot read property 'close' of undefined
ripple.js (40,29801)
TypeError: Cannot read property 'close' of undefined ...

TypeError: Cannot read property 'close' of undefined
at module.exports.exec     (http://localhost:4400/ripple/assets/ripple.js:40:29690)
at Function.Keyboard.close (http://localhost:4400/plugins/ionic-plugin-keyboard/www/android/keyboard.js:16:5)
at Object.ionic.keyboard.hide (http://localhost:4400/lib/ionic/js/ionic.bundle.js:3647:32)
at http://localhost:4400/lib/ionic/js/ionic.bundle.js:43426:61
at Scope.$emit (http://localhost:4400/lib/ionic/js/ionic.bundle.js:23474:33)
at Object.switcher.emit (http://localhost:4400/lib/ionic/js/ionic.bundle.js:46814:27)
at Object.switcher.transition (http://localhost:4400/lib/ionic/js/ionic.bundle.js:46672:22)
at http://localhost:4400/lib/ionic/js/ionic.bundle.js:48301:16
at http://localhost:4400/lib/ionic/js/ionic.bundle.js:46550:25
at Object.switcher.render     (http://localhost:4400/lib/ionic/js/ionic.bundle.js:46639:23)
ripple.js (40,29816)
Keyboard
ripple.js (48,14754)
close
ripple.js (48,14775)
cordova :: Native back button handler was detached.
ripple.js (37,13091)
missing exec:Keyboard.hideKeyboardAccessoryBar
ripple.js (40,29735)
true
ripple.js (40,29783)
[ ]

TypeError: Cannot read property 'hideKeyboardAccessoryBar' of undefined
 ripple.js (40,29801)
TypeError: Cannot read property 'hideKeyboardAccessoryBar' of undefined ...

TypeError: Cannot read property 'hideKeyboardAccessoryBar' of undefined
at module.exports.exec     (http://localhost:4400/ripple/assets/ripple.js:40:29690)
at Function.Keyboard.hideKeyboardAccessoryBar     (http://localhost:4400/plugins/ionic-plugin-    keyboard/www/android/keyboard.js:12:5)
at http://localhost:4400/js/app.js:32:32
at Array.<anonymous> (http://localhost:4400/lib/ionic/js/ionic.bundle.js:44991:19)
at onPlatformReady (http://localhost:4400/lib/ionic/js/ionic.bundle.js:2447:24)
at Channel.fire (http://localhost:4400/cordova.js:820:23)
at http://localhost:4400/cordova.js:229:49
ripple.js (40,29816)
Keyboard
ripple.js (48,14754)
hideKeyboardAccessoryBar
ripple.js (48,14775)
Ripple :: Environment Warming Up (Tea. Earl Grey. Hot.)
ripple.js (37,13091)
Failed to load resource: the server responded with a status of 404 (Not Found)
favicon.ico (0,0)
Current window: http://localhost:4400/index.html?enableripple=cordova-3.0.0-NexusGalaxy
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
ripple.js (50,29364)
Failed to load resource: the server responded with a status of 404 (Not Found)
ripple.js (50,29364)
cordova :: Initialization Finished (Make it so.)
ripple.js (37,13091)
HTML1300: Navigation occurred
index.html
Current window: http://localhost:4400/index.html
missing exec:Keyboard.init
ripple.js (40,29735)

ripple.js (40,29783)
[ ]

TypeError: Cannot read property 'init' of undefined
ripple.js (40,29801)
TypeError: Cannot read property 'init' of undefined ...

TypeError: Cannot read property 'init' of undefined
at module.exports.exec    (http://localhost:4400/ripple/assets/ripple.js:40:29690)
at null.<anonymous> (http://localhost:4400/plugins/ionic-plugin-     keyboard/www/android/keyboard.js:36:5)
at Channel.fire (http://localhost:4400/cordova.js:820:23)
at http://localhost:4400/cordova.js:1275:28
at f (http://localhost:4400/cordova.js:692:33)
at Channel.fire (http://localhost:4400/cordova.js:820:23)
at http://localhost:4400/cordova.js:1262:32
at onScriptLoadingComplete (http://localhost:4400/cordova.js:1731:5)
at scriptLoadedCallback (http://localhost:4400/cordova.js:1748:13)
at HTMLScriptElement.<anonymous> (http://localhost:4400/cordova.js:1702:17)
ripple.js (40,29816)
Keyboard
ripple.js (48,14754)
init
ripple.js (48,14775)
missing exec:Keyboard.close
ripple.js (40,29735)

ripple.js (40,29783)
[ ]

TypeError: Cannot read property 'close' of undefined
ripple.js (40,29801)
TypeError: Cannot read property 'close' of undefined ...

TypeError: Cannot read property 'close' of undefined
    at module.exports.exec     (http://localhost:4400/ripple/assets/ripple.js:40:29690)
at Function.Keyboard.close (http://localhost:4400/plugins/ionic-plugin-    keyboard/www/android/keyboard.js:16:5)
at Object.ionic.keyboard.hide      (http://localhost:4400/lib/ionic/js/ionic.bundle.js:3647:32)
at http://localhost:4400/lib/ionic/js/ionic.bundle.js:43426:61
at Scope.$emit (http://localhost:4400/lib/ionic/js/ionic.bundle.js:23474:33)
at Object.switcher.emit (http://localhost:4400/lib/ionic/js/ionic.bundle.js:46814:27)
at Object.switcher.transition (http://localhost:4400/lib/ionic/js/ionic.bundle.js:46672:22)
at http://localhost:4400/lib/ionic/js/ionic.bundle.js:48301:16
at http://localhost:4400/lib/ionic/js/ionic.bundle.js:46550:25
at Object.switcher.render (http://localhost:4400/lib/ionic/js/ionic.bundle.js:46639:23)
ripple.js (40,29816)
Keyboard
ripple.js (48,14754)
 close
ripple.js (48,14775)
cordova :: Native back button handler was detached.
ripple.js (37,13091)
missing exec:Keyboard.hideKeyboardAccessoryBar
ripple.js (40,29735)
true
ripple.js (40,29783)
[ ]

TypeError: Cannot read property 'hideKeyboardAccessoryBar' of undefined
ripple.js (40,29801)
TypeError: Cannot read property 'hideKeyboardAccessoryBar' of undefined ...

TypeError: Cannot read property 'hideKeyboardAccessoryBar' of undefined
at module.exports.exec  (http://localhost:4400/ripple/assets/ripple.js:40:29690)
at Function.Keyboard.hideKeyboardAccessoryBar (http://localhost:4400/plugins/ionic-plugin-keyboard/www/android/keyboard.js:12:5)
at http://localhost:4400/js/app.js:32:32
at Array.<anonymous> (http://localhost:4400/lib/ionic/js/ionic.bundle.js:44991:19)
at onPlatformReady (http://localhost:4400/lib/ionic/js/ionic.bundle.js:2447:24)
at Channel.fire (http://localhost:4400/cordova.js:820:23)
at http://localhost:4400/cordova.js:229:49
ripple.js (40,29816)
Keyboard
ripple.js (48,14754)
hideKeyboardAccessoryBar
ripple.js (48,14775)
missing exec:Keyboard.close
ripple.js (40,29735)

ripple.js (40,29783)
[ ]

TypeError: Cannot read property 'close' of undefined
ripple.js (40,29801)
TypeError: Cannot read property 'close' of undefined ...

TypeError: Cannot read property 'close' of undefined
at module.exports.exec (http://localhost:4400/ripple/assets/ripple.js:40:29690)
at Function.Keyboard.close (http://localhost:4400/plugins/ionic-plugin-keyboard/www/android/keyboard.js:16:5)
at Object.ionic.keyboard.hide (http://localhost:4400/lib/ionic/js/ionic.bundle.js:3647:32)
at http://localhost:4400/lib/ionic/js/ionic.bundle.js:43426:61
at Scope.$emit (http://localhost:4400/lib/ionic/js/ionic.bundle.js:23474:33)
at Object.switcher.emit (http://localhost:4400/lib/ionic/js/ionic.bundle.js:46814:27)
at Object.switcher.transition (http://localhost:4400/lib/ionic/js/ionic.bundle.js:46672:22)
at http://localhost:4400/lib/ionic/js/ionic.bundle.js:48301:16
at http://localhost:4400/lib/ionic/js/ionic.bundle.js:46550:25
at Object.switcher.render (http://localhost:4400/lib/ionic/js/ionic.bundle.js:46639:23)
ripple.js (40,29816)
Keyboard
ripple.js (48,14754)
close
ripple.js (48,14775)
missing exec:Keyboard.close
ripple.js (40,29735)

ripple.js (40,29783)
[ ]

TypeError: Cannot read property 'close' of undefined
ripple.js (40,29801)
TypeError: Cannot read property 'close' of undefined ...

TypeError: Cannot read property 'close' of undefined
at module.exports.exec (http://localhost:4400/ripple/assets/ripple.js:40:29690)
at Function.Keyboard.close (http://localhost:4400/plugins/ionic-plugin-keyboard/www/android/keyboard.js:16:5)
at Object.ionic.keyboard.hide (http://localhost:4400/lib/ionic/js/ionic.bundle.js:3647:32)
at http://localhost:4400/lib/ionic/js/ionic.bundle.js:43426:61
at Scope.$emit (http://localhost:4400/lib/ionic/js/ionic.bundle.js:23474:33)
at Object.switcher.emit (http://localhost:4400/lib/ionic/js/ionic.bundle.js:46814:27)
at Object.switcher.transition (http://localhost:4400/lib/ionic/js/ionic.bundle.js:46672:22)
at http://localhost:4400/lib/ionic/js/ionic.bundle.js:48301:16
at http://localhost:4400/lib/ionic/js/ionic.bundle.js:46550:25
at Object.switcher.render (http://localhost:4400/lib/ionic/js/ionic.bundle.js:46639:23)
ripple.js (40,29816)
Keyboard
ripple.js (48,14754)
close
ripple.js (48,14775)

【问题讨论】:

  • 您的应用针对的是哪个设备平台(例如 iOS 或 Android)?

标签: ripple visual-studio-code


【解决方案1】:

在app.js中,替换下面这行代码

cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);

if (cordova.plugins.Keyboard.hideKeyboardAccessoryBar) {
    cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}

问候

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-13
    • 1970-01-01
    相关资源
    最近更新 更多