Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap/Cordova 2.7.0: exec_gap file not found

Ive just started a new project with Cordova 2.7.0. When I run it in a web browser and look at the console I see an error saying the file !exec_gap? is not found.

I've done some searching and see that others have had this problem with cordova in the past. There answers are to change the line

 execXhr.open('HEAD', "file:///!gap_exec", true);

to:

execXhr.open('HEAD', "/!gap_exec", true);

In the cordova.js file.

However, in 2.7.0 the line is already like this:

        execXhr.open('HEAD', "/!gap_exec?" + (+new Date()), true);

Does anyone know how to fix this?

(ps: if it matters I am running JQuery Mobile and working on iOS)

like image 937
MeltingDog Avatar asked Oct 22 '22 09:10

MeltingDog


1 Answers

Phonegap/Cordova framework is mobile development framework. It is used develop mobile application using HTML, CSS and JavaScript.

If there are any native app needed like Camera, Phone Book and etc., this framework will be used to get these to our html app. For this, the app will call gap_exec.

the app which is developed using phonegap can't be run in application. This kind of application is call Hybrid application. Hybrid application: Combination of both native application and web application.

If you want to run the application as native application as well as web application, please add some condition to avoid phonegap framework (if location.protocol is http or https).

like image 167
Sridhar Boganathan Avatar answered Oct 24 '22 10:10

Sridhar Boganathan