【发布时间】:2021-01-15 05:23:04
【问题描述】:
我正在尝试实现 Nativescript-Webview-Interface。就我而言,在 IOS 模拟器上一切正常,但在从 Native 应用程序到 Webview 的发射/callJSFunction 时在 Android 上出现错误。
chromium: [WARNING:dns_config_service_posix.cc(342)] Failed to read DnsConfig.
System.err: An uncaught Exception occurred on "main" thread.
System.err: Calling js method onTouch failed
System.err: TypeError: Cannot read property 'sdkVersion' of undefined
System.err:
System.err: StackTrace:
System.err: WebViewInterface._executeJS(file: node_modules/nativescript-webview-interface/index.android.js:78:32)
System.err: at push.../node_modules/nativescript-webview-interface/index-common.js.WebViewInterface.emit(file: node_modules/nativescript-webview-interface/index-common.js:153:9)
System.err: at goToPage(file: app/components/Home.vue:145:0)
System.err: at tap(file: app/components/Home.vue?499f:93:0)
System.err: at invokeWithErrorHandling(file: node_modules/nativescript-vue/dist/index.js:1862:25)
System.err: at invoker(file: node_modules/nativescript-vue/dist/index.js:2526:13)
System.err: at _executeCallback(file: app/packages/core/ui/gestures/index.android.ts:414:20)
【问题讨论】:
-
你解决了吗?
-
对此没有任何解决方案,但我以其他方式解决了我的问题
标签: webview android-webview nativescript nativescript-vue