ionic-team / ionic-cli

The Ionic command-line interface
MIT License
2k stars 644 forks source link

Crosswalk lite? #363

Closed pewh closed 9 years ago

pewh commented 9 years ago

When I compile APK using Crosswalk, the size is too big. I think using crosswalk lite will reduce the size of compiled APK. But I have no idea to hack ionic-cli to use crosswalk lite.

My question is:

  1. Will this support crosswalk lite?
  2. Is there any hack (or temporary solution) to use crosswalk lite?

Thanks.

wfsm commented 9 years ago

+1

piernik commented 9 years ago

+1

Stiveknx commented 9 years ago

+1

jbavari commented 9 years ago

Hello all,

I've added this in the Ionic CLI beta.

Go ahead and try it out - npm install -g ionic@beta

ionic browser add crosswalk-lite

I can't promise it works 100%, since its marked as experimental from the Crosswalk team.

Stiveknx commented 9 years ago

It builds, but doesn't run on any devices ... logcat: http://pastebin.com/TmSKUP22

Also, it's missing on browser list

jbavari commented 9 years ago

I've added it to browser list, just hadn't pushed that out to beta. I'll do that here shortly.

As far as not running on any devices, I dont have any handy right now to run on other than the simulator im using, Genymotion. It's working just fine on that.

ghost commented 9 years ago

I'm keen to test this, please let me know when the beta goes out. We're having issues with Android 4.1.2 freezing up on older devices when textboxes get focus and I'm hoping for a miracle that this fixes the issue. I know it doesn't make an logical sense that it would fix the problem we're having, but I'm keen to try in any event.

pewh commented 9 years ago

I got same errors like @Stiveknx too although I use ionic starter & genymotion.

ionic start myApp tabs
npm install
bower install
ionic serve # <-- I test on browser & it's work
ionic browser add crosswalk-lite
ionic build android # <-- success to compile
ionic run android # <-- run on genymotion, and it's crash

I build with:

Plugin:

jbavari commented 9 years ago

@johannds Crosswalk lite is out in latest CLI version.

@pewh What happens when you replace ionic with cordova and run those run and build commands?

pewh commented 9 years ago

When I use cordova, it's work but the size of APK is not like crosswalk-lite. It seems cordova build with crosswalk although I use crosswalk-lite. Below is what I do:

ionic browser add crosswalk-lite
cordova build android  # <-- generate APK with size 20 MB
cordova  run android

and

ionic browse revert android
ionic browser add crosswalk-lite
cordova build android   # <-- still generate APK with size 20 MB
cordova  run android
junkoro commented 9 years ago

The browser.js of ionic cli 1.5.0 is ignoring version parameter and isLiteVersion parameter If you are cordova 5.0.x installed. ( https://github.com/driftyco/ionic-app-lib/blob/master/lib/browser.js#L453 )

Workaround: just comment L453.

This will install correct version of crosswalk. But, I tried crosswalk-lite, it's still over 20MB. I don't know why ┐(´д`)┌

janckerchen commented 8 years ago

crosswalk-lite dont reduce the size, confirm still above 20M for blank project

Cordova CLI: 5.1.1 Gulp version: Requiring external module coffee-script/register Gulp local: CLI version 3.8.11 Ionic CLI Version: 1.5.5 Ionic App Lib Version: 0.2.2 ios-deploy version: 1.4.0 ios-sim version: 3.1.1 OS: Mac OS X Yosemite Node Version: v0.12.1 Xcode version: Xcode 6.3.2 Build version 6D2105

ouani commented 8 years ago

Would love an update on this issue :)..

ffabreti commented 8 years ago

+1

ffabreti commented 8 years ago

still an issue on Jul/2015 ionic info:

Cordova CLI: 4.3.1 Ionic Version: 1.0.1 Ionic CLI Version: 1.5.0 Ionic App Lib Version: 0.1.0 OS: Distributor ID: Fedora Description: Fedora release 21 (Twenty One) Node Version: v0.12.6

cihadhoruzoglu commented 8 years ago

+1

souly1 commented 8 years ago

+1

gaguirre commented 8 years ago

+1

nicon-dev commented 8 years ago

+1 same problem here...

Cordova CLI: 5.3.3 Gulp version: CLI version 3.9.0 Gulp local: Local version 3.9.0 Ionic Version: 1.0.1 Ionic CLI Version: 1.7.10 Ionic App Lib Version: 0.6.5 ios-deploy version: 1.7.0 ios-sim version: 5.0.1 OS: Mac OS X El Capitan Node Version: v0.12.7 Xcode version: Xcode 7.1.1 Build version 7B1005

bleuscyther commented 8 years ago

+1

abdoutelb commented 8 years ago

+1 i would love to see an apk less than 20 M

ziaenezhad commented 8 years ago

+1

gerardcarbo commented 8 years ago

+1

ouani commented 8 years ago

Why is this issue even closed ?

dkro commented 8 years ago

+1

BojDom commented 8 years ago

I made a tutorial of i succesfully integrated crosswalk-lite with an ionic project

http://stackoverflow.com/questions/35091350/crosswalk-lite-with-cordova

cinder92 commented 8 years ago

+1

lucasmendonca commented 8 years ago

+1

prijindal commented 8 years ago

+1

prijindal commented 8 years ago

Found a solution Instead of doing ionic plugin add cordova-plugin-crosswalk-webview

Do this

ionic plugin add cordova-plugin-crosswalk-webview --variable XWALK_MODE="lite"

matheo commented 8 years ago

@prijindal It installs nicely, thanks! I had to uninstall the previous version and restore the android platform in order to get it on Crosswalk :D

Mozilla/5.0 (Linux; Android 6.0.1; Moto G Build/MOB30M) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/46.0.2490.86 Crosswalk/17.46.459.1 Mobile Safari/537.36"

BTW, you needed to change this

<preference name="xwalkVersion" value="18+" />

to 17+ because there's no 18 for lite yet huh

vivek1729 commented 7 years ago

@prijindal, I followed your advice and Crosswalk-lite seems to be installed and configured as it reflects in ionic.project file. But no changes in config.xml. If I modify the config file as suggested by @matheo, I get a compilation error. Also, I tried compiling with the normal crosswalk and the lite version but the size of the apk output remains exactly the same. Has anyone else gotten this plugin to work successfully reducing their apk size?

My ionic.info yields:

 Cordova CLI: 6.0.0
 Gulp version:  CLI version 3.9.1
 Gulp local:   Local version 3.9.1
 Ionic Version: 1.2.4
 Ionic CLI Version: 1.7.14
 Ionic App Lib Version: 0.7.0
 ios-deploy version: Not installed
 ios-sim version: Not installed 
 OS: Mac OS X El Capitan
 Node Version: v5.3.0
 Xcode version: Not installed