Crosswalk Integration Beta in Ionic CLI (v1.3.2)

I wanted to use this in an existing project and everything went fine until :dexDebug

Nothing special, I updated ionic, added crosswalk, and ‘ionic run android’ and this happened:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
  	/home/jbert/Downloads/BackUp/adt-bundle-linux-x86_64-20140321/sdk/build-tools/19.1.0/dx --dex --no-optimize --output /home/jbert/Lurk.it/platforms/android/build/intermediates/dex/debug /home/jbert/Lurk.it/platforms/android/build/intermediates/classes/debug /home/jbert/Lurk.it/platforms/android/build/intermediates/pre-dexed/debug/classes-6e759a31b25e339459239fba407d51b13a79c090.jar /home/jbert/Lurk.it/platforms/android/build/intermediates/pre-dexed/debug/xwalk_core_library_java_app_part-5505ad56b460ad3d2d8fb98c95948a3074f0ee29.jar /home/jbert/Lurk.it/platforms/android/build/intermediates/pre-dexed/debug/classes-1d7fb91b0e1f52ca74c544554ef33127855f6af0.jar /home/jbert/Lurk.it/platforms/android/build/intermediates/pre-dexed/debug/xwalk_core_library_java_library_part-3456c4845d4ac487b650109ec90b4dac03b2393a.jar /home/jbert/Lurk.it/platforms/android/build/intermediates/pre-dexed/debug/xwalk_core_library_java-b7033f6d1eeabc59c7444bfa16cb665a2e377ccf.jar
  Error Code:
  	2
  Output:
  	
  	UNEXPECTED TOP-LEVEL EXCEPTION:
  	com.android.dex.DexException: Multiple dex files define Lcom/googlecode/eyesfree/braille/display/BrailleDisplayProperties$1;
  		at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)
  		at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)
  		at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)
  		at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)
  		at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
  		at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
  		at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
  		at com.android.dx.command.dexer.Main.run(Main.java:230)
  		at com.android.dx.command.dexer.Main.main(Main.java:199)
  		at com.android.dx.command.Main.main(Main.java:103)

My bad if the formatting is bad, I’m on my phone.

2 Likes

@mhartington, thanks for your quick response, can we make it possible for user to integrate different version of Crosswalk which they want to?

As far as different versions per android version, not sure how that would work.
But as far as saying crosswalk 8, 9, 10, or 11, yes that will be available soon

Good news! @mhartington, thank you so much!

  • What went wrong:
    Execution failed for task ‘:preBuild’.

failed to find Build Tools revision 20.0.0

Missing one of the key attributes ‘action#name,category#name’ on element intent-filter at AndroidManifest.xml:15:13

would you fixed it???

/Users/game-netease/Desktop/ios/webapp/rm3.0/rm3_mobile/platforms/android/AndroidManifest.xml:35:5 Error:
Missing ‘name’ key attribute on element uses-permission at AndroidManifest.xml:35:5
/Users/game-netease/Desktop/ios/webapp/rm3.0/rm3_mobile/platforms/android/AndroidManifest.xml:36:5 Error:
Missing ‘name’ key attribute on element uses-permission at AndroidManifest.xml:36:5
/Users/game-netease/Desktop/ios/webapp/rm3.0/rm3_mobile/platforms/android/AndroidManifest.xml:37:5 Error:
Missing ‘name’ key attribute on element uses-permission at AndroidManifest.xml:37:5
/Users/game-netease/Desktop/ios/webapp/rm3.0/rm3_mobile/platforms/android/AndroidManifest.xml:0:0 Error:
Validation failed, exiting

fixed it

by change name to android:name

/Users/game-netease/Desktop/ios/webapp/rm3.0/rm3_mobile/platforms/android/res/values/multiimagechooser_strings_en.xml:7: Error: “discard” is not translated in “de” (German), “es” (Spanish), “fr” (French), “hu” (Hungarian), “ja” (Japanese), “ko” (Korean) [MissingTranslation]
Cancel

by ionic build android --release

1 Like

How exactly would you do this? Is just by passing ‘BUILD_MULTIPLE_ARCHS=true’ as a flag to ‘ionic build or ionic run’?

by ionic build android --release

when I run in genymotion it go’s very well, but I cant build with release the error is

/Users/game-netease/Desktop/ios/webapp/rm3.0/rm3_mobile/platforms/android/res/values/multiimagechooser_strings_en.xml:7: Error: “discard” is not translated in “de” (German), “es” (Spanish), “fr” (French), “hu” (Hungarian), “ja” (Japanese), “ko” (Korean) [MissingTranslation]
Cancel

fixed it build success
add translatable=“false” in string.xml

The --release flag only turns ‘debuggable’ off, that is not for building different apks with crosswalk.

when I built success with ionic build android ,but not in --release ~

Neither ‘BUILD_MULTIPLE_ARCHS=true ionic run android’ , nor ‘BUILD_MULTIPLE_APKS=true ionic run android’ works on Windows at the moment. Is there any other way to have separate builds?

It won’t run on Windows if you have a SPACE in your project filepath! The path is not properly escaped I guess.

An easier way to have separate Arm and X86 builds on Windows is just to set a system variable ‘BUILD_MULTIPLE_APKS=true’ and just run ‘ionic build android’ or ‘ionic run android’ on the console.

Hi,

I have added crosswalk browser last day ,it was added successfully and works well.When I see the output folder the apk file size was too large .its showing the whole project content memory why is it so?.then I tried the command to remove crosswalk browser with “ionic browser remove crosswalk”.

After removed the crosswalk browser .I used “ionic build android” command.I am getting the following error.
See the attached file.image