问题
I cloned an existing ionic project from git. I have ionic 1.3.2
and cordova 4.2.0
. After cloning, i cd
ed into the directory and did an ionic browser add crosswalk
. It says that crosswalk was added successfully. Then when i try to do ionic run android
, it says
No platforms added.
So i do a ioinic platform add android
, which gives me this error:
Failed to install 'org.apache.cordova.engine.crosswalk':CordovaError: Plugin doesn't support this project's cordova-android version. cordova-android: 3.6.4, failed version requirement: >=4.0.0-dev`.
ionic platform add android@4.0.0-dev
returns
Unable to fetch platform android@4.0.0-dev: Error: version not found: cordova-android@4.0.0-dev
How do I fix this?
P.S. I am using ubuntu 14.04
回答1:
The problem is crosswalk browser.
If you revert back to android webview, which sucks, but works.
ionic browser revert android
ionic platform rm android
ionic platform add android
As of today, 4/9/2015. I have been able to go back to the old projects and add crosswalk after updating node runtime, ionic, cordova
回答2:
Before running ionic run android
have you tried adding a directory named www?
回答3:
It seems that by entering ionic platform add android
, it installs the platform from the npm and the latest cordova-android version, which is.... 3.7.1 (currently)
Cordova-android 4.0 is still beta, but there's good news for those who wish to install it. You can download the 4.0 version directly from the apache github repository:
ionic platform add https://github.com/apache/cordova-android.git
There are more bugs along that road, but at least it's a working solution for that bug. It seems that apache still have plenty of issues with plugins compatibility, hopefully they'll overcome them in the next official release.
Update:
Download Intel XDK. This is just an unbelievable tool for developing mobile apps, Intel has really figured it out imo. Built in brackets, emulator, remote debugging, and most important: One button click to build apks with crosswalk for android. All you have to do is importing your www folder and you are good to go!
My app went from sluggish 5fps while scrolling to fully native feel in a click. I'm still in awe. :)
来源:https://stackoverflow.com/questions/28134884/cant-add-crosswalk-with-ionic-cli-1-3-2