question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"cordova.js" was not generated in Android

See original GitHub issue

Hi.

I am getting this error and my application is not running.

CordovaDeviceRouter.js:14 GET http://10.0.1.17:8081/platform_cordova_files/android/cordova.js net::ERR_ABORTED
[Vue warn]: Error in mounted hook: "ReferenceError: cordova is not defined"
Refused to execute script from 'http://10.0.1.17:8081/platform_cordova_files/android/cordova.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Has anyone had a similar problem?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
catalsdevelopcommented, May 24, 2018

@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
1reaction
caiobioderecommented, Jul 16, 2018

@catalsdevelop @hastom @tartinesKiller Thank you guys, everything is working now 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

cordova.js is missing on a new project - Stack Overflow
No, you're all good. Cordova.js will be generated when you build a specific platform (i.e. cordova build android ).
Read more >
Android Platform Guide - Apache Cordova
Android Platform Guide. This guide will help set up your development environment for building Cordova apps for Android devices and optionally use ...
Read more >
Ionic cordova run android is failing
Hello, i am trying to run ionic cordova run android but i always fails. here is the exception details: here is the ionic...
Read more >
HCP works on browser, but not on Android app - Meteor forums
Android log shows some errors like cordova.js not found in bundle etc. The app works perfectly though. Just the HCP does not work...
Read more >
cordova-android - npm
Cordova Android · Requirements · Create a Cordova project · Updating a Cordova project · Debugging in Android Studio · How to Test...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found