[Android] Web Console: Uncaught TypeError: Object [object Object] has no method 'xxx'
2014-03-17 10:37
489 查看
我们开发的产品,有一部分功能,需要在WebView中打开web页面,然后在web页面中通过js方法回调部分native的功能。
对于web回调native的开发方式,如果不了解的话,可以参考我以前的一篇博文《Android中Webview使用自定义的javascript进行回调》/article/2474012.html
最近测试发现,在某些最新机型上(4.2及以上),JS回调好像不起做用了。打开log,提示Uncaught TypeError: Object [object Object] has no method 'xxx' 。其中xxx就是web页面中写的js方法名。
仔细研究,发现是因为Android4.2及以上版本对于js的支持方式有改变导致(又是一起新版本导致的不兼容事件,最近这种事情越来越多了)。具体的,请看下面这篇文章,写的很详细了,没有必要再写一遍了,请直接参考吧。/article/2339362.html
记录于此,方便网友查询。
对于web回调native的开发方式,如果不了解的话,可以参考我以前的一篇博文《Android中Webview使用自定义的javascript进行回调》/article/2474012.html
最近测试发现,在某些最新机型上(4.2及以上),JS回调好像不起做用了。打开log,提示Uncaught TypeError: Object [object Object] has no method 'xxx' 。其中xxx就是web页面中写的js方法名。
仔细研究,发现是因为Android4.2及以上版本对于js的支持方式有改变导致(又是一起新版本导致的不兼容事件,最近这种事情越来越多了)。具体的,请看下面这篇文章,写的很详细了,没有必要再写一遍了,请直接参考吧。/article/2339362.html
记录于此,方便网友查询。
相关文章推荐
- [Android]通过js方法回调部分native报错 Web Console: Uncaught TypeError: Object [object Object] has no method 'xxx'
- [Android] Web Console: Uncaught TypeError: Object [object Object] has no method 'xxx'
- android中java和JS互相调用,Web Console: Uncaught TypeError: Object [object Object] has no method
- 【Android】Web Console: Uncaught TypeError: Object [object Object] has no method 'xxx'
- [Android] Web Console: Uncaught TypeError: Object [object Object] has no method 'xxx'
- Android webview js 调用java方法报错"Uncaught TypeError: Object [object Object] has no method xx
- 安卓WebView报错:android uncaught typeerror object object object has no method
- Uncaught TypeError: Object [object Object] has no method 'live'
- Android js交互错误:Uncaught TypeError: Object [object Object] has no method 'xxx'
- JS调用Android中的方法时出现 "Uncaught TypeError: Object [object Object] has no method
- WebView注入Java对象注意事项 [INFO:CONSOLE(475)] "Uncaught TypeError: Object [object Object] has no method
- Uncaught TypeError: Object #<Object> has no method 'fancybox'
- Uncaught TypeError: Object [object Object] has no method 'highcharts'
- TypeError: Object #<IncomingMessage> has no method 'flash'
- 当使用JQuery的"$",抛异常Uncaught TypeError: Object #<Object> has no method 'ajax'
- jquery dialog异常 Uncaught TypeError: Object [object Object] has no method 'dialog'
- Android webview解决JS报错chromium: [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read property 'getItem'
- 使用ajaxfileupload插件提示Uncaught TypeError:has no method 'handleError'
- jQuery File upload, Uncaught TypeError: Object function ... ... has no method 'widget'
- ztree “Uncaught TypeError: Object # has no method 'toLowerCase'”