Android Studioに付属しているAndroid Virtual Device (Android Emulator) では、API 19相当の端末としてAndroid 4.4.2のエミュレータが起動する。
このエミュレータ上のWebViewでPromiseを実行すると、下記のようなエラーを確認できる。
Uncaught ReferenceError: Promise is not defined
一方Android 4.4.4を搭載した実機(や仮想マシン)では正常に実行できる。つまりPromiseが定義されている。
Android 4.4.xと呼ばれるものは複数存在している:
Android 4.4ではWebView実装のChromium置き換えが含まれていて、この時導入されたのはChromium 30である。
The WebView shipped with Android 4.4 (KitKat) is based on the same code as Chrome for Android version 30. This WebView does not have full feature parity with Chrome for Android and is given the version number 30.0.0.0.
https://developer.chrome.com/multidevice/webview/overview#what_version_of_chrome_is_it_based_on_
そして4.4.3ではこれがChromium 33にアップデートされている。
The updated WebView shipped with Android 4.4.3 has the version number 33.0.0.0.
https://developer.chrome.com/multidevice/webview/overview#what_version_of_chrome_is_it_based_on_
上記はChangelogを探ると実際にAndroid 4.4.3のリリースに含まれている。
ChromiumにPromiseが実装されたのはChromium 32のときなので、Android 4.4.2までのバージョンでは利用できないことになる。