Android webview reports TypeError: undefined is not a function

1. Problem
On the Android 5.1.1 system, the webview opens some pages with a white screen or no response when clicking, and there is such a line of error found through the log

"TypeError: undefined is not a function", source: file:///android_asset/dist/index.js (1)

The initial suspicion is that some parameters of the Android webview have not been set properly. After tossing for a while to no avail, I finally found out that it is a problem on the web side.

2. Solution
Some new features such as es6 and promise used in the js on the web side cause the webview not to support it, so the web side can introduce some third-party js files to convert the js syntax to solve the problem.

Guess you like

Origin blog.csdn.net/qq_36356379/article/details/115087178