Closed caiotarifa closed 6 years ago
Did you check if you have Cordova installed on your machine?
Cordova: https://cordova.apache.org/
Yes, @caiobiodere.
$ cordova -v
8.0.0
This error is in Chrome inspector, after I compiled my app w/ cordova run android -- --lr
.
Thanks
@caiobiodere, I realized that the cordova.js
file was not generated on Android, even using cordova run android -- --lr
command.
Can you tell me why?
Could you check your npm, node and cordova versions?
Please start a new project from scratch using cordova:
cordova create <project_create_dir> [com.example.projectname] [ProjectClassName] --template cordova-template-framework7-vue-webpack
Npm version: 5.6.0 Node version: 8.9.4 Cordova version: 8.0.0 cordova-android version: 7.0.0 cordova-browser version: 5.0.3
Does testing on a remote device and not the emulator might be the cause of the problem?
$ cordova -v
8.0.0
$ node -v
v9.5.0
$ npm -v
5.6.0
The cordova-android version
is 7.0.0
.
I will try to create a new project from scratch soon.
Yes mate, that's really the cause of your problem and there has been explained in another task : https://github.com/caiobiodere/cordova-template-framework7-vue-webpack/issues/62. Could you use with the native emulator?
Got it.
On remote iOS it works without problems. It is an Android thing.
I will check your problem when I get some time for free, Just to I know are you using this command to test on other devices?
cordova run browser -- --lr
No, I am using cordova run android -- -lr
to test on Android and cordova run ios -- -lr
to test on iOS.
Ok! Thank you, xarΓ‘. π
Yes I know what you doing there, but please don't use android or ios platforms on browsers that's not a good situation and probably is going to take some errors, always is better using (run browser) for browsers
I appreciate your concern, awesome Xara π
@caiobiodere, sure... I didn't use the browser (just to check if the file cordova.js
exists on the local server).
In fact, my app doesn't work in browsers.
when I first time run cordova.js loaded after than cordova.js not found
@caiotarifa I think that's because of hooks problems. see https://github.com/caiobiodere/cordova-template-framework7-vue-webpack/blob/master/template_src/hooks/beforedep.js#L14. In cordova-android@7.1.0, there is no assets/www
in android dir, so I change it to platform_www
, and run cordova run android -- --device --lr
, everything is ok. But I didn't dig too much about beforedep.js
. Can u take a look at this problem? @caiobiodere .
my env:
npm 5.6.0
node 8.9.4
cordova-cli 7.1.0
cordova-android 7.1.0
cordova-browser 5.0.3
cordova-ios 4.5.4
yes @catalsdevelop I'm going to see that
Got a similar problem as I was building app with webpack to www/dist.
In my index.html including cordova.js
like this ../cordova.js
fixed an issue for me
@catalsdevelop fix seems to work for me too (thanks a lot!), it seems like a path confusion?
@catalsdevelop @hastom @tartinesKiller Thank you guys, everything is working now π
Hi.
I am getting this error and my application is not running.
Has anyone had a similar problem?