Cordova.js file requirment

Please do I still need to include this “cordova.js” file in my index page. If I will how will I link to it because the file is located in “appdirectory\cordova\platforms\android\platform_www” for android.
There was also already a file in index page called “js/cordova-app.js”.
I am using f7 v5 and my directories are structured according to this command “framework7 create”
If I use “cordova.js” in my index the loading of that file failed.
Thanks for your response.

The cordova.js file is added during the build process of Cordova. You don’t have to bother about this file during development.

Thanks. Do you mean I should not add the file to my index.html as script.
I have been trying to use cordova camera which I did not receive any error. I hope it is not the issue for that.
Thanks ones more.

Yes that is correct. If you use the Framework7 cli to create an app, there is an placeholder comment at the end of index.html, which is automatically replaced with the cordova.js script tag at build time.

Thanks. But I did not get you right. Currently this is what I have in my index.html

  <!-- Framework7 library -->
  <script src="framework7/js/framework7.bundle.min.js"></script>
  <!-- Cordova APIs -->
  <script src="js/cordova-app.js"></script>
  <!-- App routes -->
  <script src="js/routes.js"></script>
  <!-- App scripts -->
  <script src="js/app.js"></script>

Do I still need to add src=“cordova.js”> script

Yes, if you target cordova platform you need to specify path to cordova.js. Check how it is done in project created with F7-CLI

Yes I target cordova platform but I do not know how to reference the link in my index page.
The cordova file was located in this directory for android “appDirectory\cordova\platforms\android\platform_www”.
Please kindly assist me on how to do this reference.

Link should be

<script src="cordova.js"></scrirpt>

Once again:

Check how it is done in project created with F7-CLI

I am having error in loading the cordova.js file from the link you provided up there. This is the error from my browser (Loading failed for the with source “http://localhost:8080/cordova.js”).
Secondly, I did not know where to find what you suggest that I should do here “Check how it is done in project created with F7-CLI”
Please give more detail.

F7-CLI is this