Software Archive
Read-only legacy content

Problem with Cordova and Crosswalk

Pablo_G_
Beginner
362 Views

Hi, I made an app with crosswalk optimization. I tried to build mi app without the cloud based cordova system. So I followed these steps (indicated in the tutorial):

1- Generate a Package (zip), with all plugins needed. (crosswalk 19 (embeded), minimum android api 14, target android api 21)

2- Created a cordova project (cordova --version ==> 7.0.1)

3- Added android platform

4- Cordova build andoroid.

But, the build fails. It's give me an error when generates Java code form Crosswalk Web Engine. This is the error:

Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\Users\pablo\Desktop\MyApp\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 {
       ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Picked up _JAVA_OPTIONS:  -Xmx512M

I dont understand way this error, maybe versions issues? 

Thanks!

 

0 Kudos
3 Replies
Alex_Hang
New Contributor II
362 Views

Hello sir,

If you can't build the app using Cordova CLI, you can use PhoneGap Build https://build.phonegap.com/

I also have a lot of errors when building with Cordova CLI, but no error when building with PhoneGap Build, try and see if it works

0 Kudos
PaulF_IntelCorp
Employee
362 Views

Please try building with PhoneGap Build, as @Alex recommends. Using Cordova CLI v7.x is not tested, and there have been many changes made to the way CLI works and the files that are expected (especially for plugins), so I recommend that if you wish to proceed using Cordova CLI that you install 6.5 or earlier.

If you are targeting Android 5.x and greater devices there is no significant need for using Crosswalk, which has been retired by the Crosswalk Project team. To target Android 5.x or later, set your "Minimum Android API" level to 21 (you can leave the "Target Android API" level at 21). Doing that will prevent your app from being installed onto Android 4.4 and lower devices.

p.s. Here's a summary of the many changes to Cordova CLI 7.x > https://cordova.apache.org/news/2017/05/04/cordova-7.html <

0 Kudos
Pablo_G_
Beginner
362 Views

Ok, thanks, I will try PhoneGap Build. 

I find a solution changing Crosswalk plugin version to 2.2.0 (not 1.8.0 that's xdk put in config.xml file). So, changing directly the crosswalk plugin to 2.2.0 version (in the config.xml) worked for me.

Also I had to change the minium version of android sdk (generated in config.xml file) to a higher version.

Thanks!

0 Kudos
Reply