问题
I am using a WebView in my app. This WebView must display an external webpage. It works fine on iOS, but on Android I get a white screen.
In the console I see this warning: W/cr.BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid
I added debug messages inside the load event of the WebView. When I call the getHtml method there I see that the html is being retrieved. I have no idea why it is not being displayed?
I find some similar issues on stackoverflow (issues that were not related with Titanium) but this issues did not point me to a solution. Here is one of the issues I've found:
Android Webview: Cannot call determinedVisibility() - never saw a connection for the pid
I hope someone can point me in the right direction. Thanks in advance!!
回答1:
We have solved the problem for
BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid
and for
libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
by using the following WebView for android: http://gitt.io/component/de.marcelpociot.webviewfragment , which contains fixes for : https://jira.appcelerator.org/browse/TIDOC-1548
回答2:
Try adding borderRadius: 1 to the Webview properties
var webview = Ti.UI.createWebView({url: '..', borderRadius: 1});
This disabled the hardware acceleration of the webview..
See the docs for more information: http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.WebView
来源:https://stackoverflow.com/questions/34944007/ti-ui-webview-on-android-webpage-is-not-being-displayed