简体   繁体   中英

Ionic build error with Crosswalk versions < 2.0.0 - “XWalkWebViewEngine is not abstract and does not override abstract method”

Have come back to an Ionic project after a year to update a couple of things but now the project won't build.

The issue looks to be Crosswalk when updating to the latest version it builds fine but the device I am building for specific uses Android 4 which is only supported by cross walk 1.6.0 - 1.8.0.

The error shown on the output is:

..platforms/android/src/org/crosswalk/engine/XWalkWebViewEngine.java:55:
error: XWalkWebViewEngine is not abstract and does not override abstract method
evaluateJavascript(String,ValueCallback<String>) in CordovaWebViewEngine public
class XWalkWebViewEngine implements CordovaWebViewEngine {

I have been searching the for a while and nothing had worked. Removing all plugins and platforms and reinstalling in various orders, updating Android SDK etc.

I am on a new machine so not sure if it's linked the NPM version or Cordova version. For info: npm is 4.3.0 and Cordova is 6.5.0

Resolved by re-adding cordova-plugin-crosswalk-webview:

cordova plugin rm cordova-plugin-crosswalk-webview
cordova plugin add cordova-plugin-crosswalk-webview
try these commands
1.cordova plugin rm cordova-plugin-crosswalk-webview
2.cordova plugin add cordova-plugin-crosswalk-webview@2.2.0
3.cordova platform rm android
4.cordova platform add android@<version>

it has solved my issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM