0

I've installed the crosswalk plugin and built my app with cordova build --release. This generated 2 apk files: android-armv7-release-unsigned.apk and android-x86-release-unsigned.apk. Now I would like to run my app on my device using one of these apk's, but when I run ionic run android --device, it builds 2 more apks and uses android-armv7-debug.apk to run the app. How can I choose the apk that my app needs to use ?

Thanks

Edit: here's config.xml

enter image description here

clems36
  • 922
  • 1
  • 13
  • 26

1 Answers1

1

You should be running with release and prod flags.

ionic run android --prod --release

Check the link By default it will build and run debug apks.

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
  • I figured in the end that the only thing I want to do is run my app and make sure that it is running on Crosswalk, so I don't need to use a release version of the apk, do I ? It is said on the [Crosswalk website](https://crosswalk-project.org/documentation/cordova.html) that when the app is running, you can check that it uses Crosswalk by inspecting `navigator.userAgent`, but it doesn't appear in my console... Any idea ? – clems36 Jan 23 '17 at 09:33
  • You seem to be mixing both cordova and ionic commands.. I mentioned the flags as per the question of choosing the build or release apk. For crosswalk, you can use `ionic run android` directly, it will call the corresponding cordova command. – Suraj Rao Jan 23 '17 at 09:41
  • did you install crosswalk through ionic-native? – Suraj Rao Jan 23 '17 at 09:43
  • I installed it with `cordova plugin add cordova-plugin-crosswalk-webview`. And no matter what apk is used to run the app, it's not running with crosswalk. – clems36 Jan 23 '17 at 12:53
  • do you have an entry in config.xml for crosswalk? if not uninstall and reinstall with `ionic plugin add cordova-plugin-crosswalk-webview` – Suraj Rao Jan 23 '17 at 12:59
  • I didn't, uninstalled and reinstalled with ionic, still no entry in config.xml... – clems36 Jan 23 '17 at 13:04
  • can you share config.xml? – Suraj Rao Jan 23 '17 at 13:06
  • I posted it as an answer. – clems36 Jan 23 '17 at 13:11
  • which os version are you trying for? – Suraj Rao Jan 23 '17 at 13:27
  • Android version ? 5.0.1 – clems36 Jan 23 '17 at 13:29
  • ?? ionic should work without crosswalk.. Crosswalk is needed if your version is 4.4 to around 4.2(not sureof lowest one) – Suraj Rao Jan 23 '17 at 13:30
  • Well I am currently testing on my device but the goal of the app is to work on devices running on older versions so I should be able to try it on mine first shouldn't I ? – clems36 Jan 23 '17 at 13:36
  • ok try `ionic plugin add cordova-plugin-crosswalk-webview --save` installing with save and check config.xml again – Suraj Rao Jan 23 '17 at 13:38
  • It added `` to config.xml! But I still can't make sure that the app is running with crosswalk as they explain it on their website. – clems36 Jan 23 '17 at 13:46
  • try in an emulator with android version lower than 4.4 – Suraj Rao Jan 23 '17 at 13:48
  • ionic by itself does not support lower than 4.4 – Suraj Rao Jan 23 '17 at 13:49
  • Ok I will try that and come back here, thank you for your time! – clems36 Jan 23 '17 at 13:58
  • Hi, I've tryed with an emulator running on 4.3 but still not running with crosswalk... – clems36 Jan 25 '17 at 15:40