香辣鸡丁煲 2016-06-28 03:10 采纳率: 0%
浏览 1358

三星4.1.2中webview无法执行h5中的方法

我想实现是点击Android控件来保存在h5中编辑的信息,并且展示给另一个html。
js代码、html文件还有别的,前端已经帮我写好了。

我使用的设备是4.1.2, 编译版本19,都高于4.0可是点击按键无法保存,已经用alert测试过,点击保存按钮是可以跳转到对应html中的保存function代码块里的。

用其他比较高版本设备、模拟器来测试均可以保存,能够与h5正常交互。

我几乎在每个调用h5的Java代码里都已经标注有@JavascriptInterface,但是都没有用。

其中调试出一部分显示错误的信息如下:
06-28 11:10:10.789: E/Web Console(24061): Warning: render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.:1

06-28 11:10:10.789: E/Web Console(24061): Warning: render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.:1

想请教一下大神们这个该如何解决,谢谢!
  • 写回答

1条回答 默认 最新

  • 普通网友 2016-10-05 14:20
    关注

    ml文件还有别的,前端已经帮我写好了。
    我使用的设备是4.1.2, 编译版本19,都高于4.0可是点击按键无法保存,已经用alert测试过,点击保存按钮是可以跳转到对应html中的保存function代码块里的。
    用其他比较高版本设备、模拟器来测试均可以保存,能够与h5正常交互。
    我几乎在每个调用h5的Java代码里都已经标注有@JavascriptInterface,但是都没有用。
    其中调试出一部分显示错误的信息如下:
    06-28 11:10:10.789: E/Web Console(24061): Warning: render(): Rendering components directly into document.body is discouraged, sinc

    评论

报告相同问题?

悬赏问题

  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算