Source issues/comments:
This path is not accurate for cordova-android 7: https://github.com/ionic-team/ionic-app-scripts/blob/master/src/dev-server/serve-config.ts#L26
The path changed and we likely need to support both:
platforms/android/assets/www (cordova-android <7**)
platforms/android/app/src/main/assets/www (cordova-android **7).
Update: Ionic does not officially support Cordova 8. Please use 7 (npm i -g cordova@7).
Cordova 7 will add cordova-android 6, which means the app-scripts livereload asset path in serve-config.ts is still accurate.
If you want things to work with cordova-android 7, please see this solution: https://github.com/ionic-team/ionic-app-scripts/issues/467#issuecomment-357803397
I installed cordova 7 but I'm still getting the same error. Everytime I run the Ionic app on my Android phone it says "Cordova not available".
I have the same issue.
I resolve with this fix #467
so waiting for an official update from ionic
Is this being merged and published? It's quite a big issue...
Same problem for me ("Cordova not available") using Ionic CLI 3.19.1, cordova CLI 8.0.0 and cordova-android 7.0.0.
This Fix by @BritoMatheus resolve it for now...
Any update on this issue? Developing on Android is nearly impossible, as native plugins will not work without cordova.js.
@vjanssens, the other day I created a simple node script in my current project to manually change the relevant file path.. basically, this just "automates" the temporary workaround that @ivanosire referenced above. maybe that would help you a bit in the meantime?
This is a temporary fix.
But look well that Ionic has officialy published this note. The latest version of the cordova-android platform (7.0.0) is not yet supported by Ionic so for now it's better to use 6.4.0 version
it's a pity that Zach doesn't provide any links to more information on that that note... but it does state that it "is not yet supported by Ionic Pro's Package service.", not that an Ionic project can't use it. :) all my local builds are working fine on my test devices.
I'm having the same issue as described in many posts, and I'm about out of idea about how to fix it. Here's some info if anyone can help me out:
Ionic version: (check one with "x")
[ ] 1.x
[x] 2.x
I'm submitting a ... (check one with "x")
[x] bug report
Current behavior:
Cordova plugins are not loaded when I run the app on a android device with the --livereload OR with the --console flags. Both rely on the livereload server.
Expected behavior:
It should load the cordova plugins whenever the app is run on a device. I am not having an issue with iOs using the same flags.
Steps to reproduce:
Related code:
insert any relevant code here
Other information:
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 6.4.0 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
ios-sim : 6.1.2
Node : v6.10.0
npm : 2.15.12
OS : macOS Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : /Users/j/Library/Android/sdk
Misc:
backend : pro
When is Ionic likely to support Cordova 8 / cordova-android 7+ ?
Is there some reason to not support cordova8 for now, like it will break compatibility with cordova7? Or, is this related to Ionic4 and the new CLI with Ionic4 support will get the support for new cordova8/cordova-android7 also?
Hey folks, I just released 3.1.9 with a fix for this from @itslenny 馃帀 Everybody thank him! 馃槃
Most helpful comment
Hey folks, I just released 3.1.9 with a fix for this from @itslenny 馃帀 Everybody thank him! 馃槃