Ionic - crosswalk and facebook plugin not working together?


I created a brand new project today using the ionic framework:

ionic start myProject blank
ionic platform add android
ionic build android
ionic run android

Everything works fine so far.

I then add crosswalk

cordova plugin add cordova-plugin-crosswalk-webview
ionic build android
ionic run android

Everything runs fine so far.

I then add the phonegap facebook plugin

cordova -d plugin add /path/to/plugin --variable APP_ID=“123456789” --variable APP_NAME="myappname"
ionic build android

I get the following error:

UNEXPECTED TOP-LEVEL EXCEPTION: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;


FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:transformClassesWithDexForArmv7Debug’. org.gradle.process.internal.ExecException: Process ‘command ‘/usr/lib/jvm/java-7-openjdk-amd64/bin/java’’ finished with non-zero exit value 2

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


So it looked like the plugin might be wrong, so I removed crosswalk to see if without crosswalk the plugin still didn’t work:

ionic browser rm crosswalk
ionic build android
ionic run android

To my surprise it worked. The app ran with no errors. So it then seems that if crosswalk and the facebook plugin are together it doesn’t work? Has anyone experienced this previously? I ask because crosswalk and the Facebook plugin are quite popular so I assume someone has.



If somebody finds out a solution to this compability problem, I’m also interested in hearing the workaround! Any ideas, anyone?


I looked into this for a couple of weeks with no success. Crosswalk has this as a known issue (, but the ticket was created in 2014 and no work has been done on it. I contacted them weeks ago about this ticket, but never received a response. I would not count on this being fixed by Crosswalk and most likely will need to be fixed ourselves. Many people face a similar problem, some solutions work for some, but I was not able to get any to work for me.

PS the person who the ticket is assigned to is an inactive user.


Good points. Btw, I found a possible solution, and I’m playing around with it right now:


Hooray! I have now succesfully built an APK with Crosswalk + Facebook plugin combination. Using cordova-plugin-crosswalk-webview instead of crosswalk browser seems to solve the problem.

It’s important to notice, that you need to use cordova-plugin-crosswalk-webview version 1.2.0 since newer versions do build but crash in the launch. The combination I can confirm to work is cordova-plugin-crosswalk-webview@1.2.0 and phonegap-facebook-plugin@0.12.0.

So, to fix your shit, make sure you don’t have any Crosswalk-related stuff installed, and run the following to add proper version of Crosswalk support.

cordova plugin add cordova-plugin-crosswalk-webview@1.2.0

After that you should be able to run ionic run android and ionic build android as you would normally do.


Man you’re genius! did it this way and it built successfully… I think it has to be with the android support version… It seems that a newer version will have android-support-v13.jar but phonegap-facebook-plugin still uses android-support-v4.jar… anyways, it did the damn trick, thanks!


Try this:

cordova plugin rm cordova-plugin-crosswalk-webview
cordova plugin add cordova-plugin-crosswalk-webview@2.2.0

It´s work for me