Environment: MyEclipse + phonegap-2.9.0
After the tutorial is complete, when you browse the page, you always jump out of 3 script hints:
1:gap:["Device", "Getdeviceinfo", "Device1517034355"]
2:gap:["NetworkStatus", "Getconnectioninfo", "NetworkStatus1517034356"]
3:gap:["App", "Show", "App1517034357"]
There was no such phenomenon when using eclipse directly;
Baidu checked the following:
Some people say: You can put the Cordova.js file in the.
return ' Gap: '+json.stringify ([Service, Action, Callbackid]);
This sentence directly commented out, commented out of the computer on the page is not to appear before the 3 hints, this is just to let you in the debugging time to avoid the point 3 of the trouble. At the end of the release, it's time to get rid of the notes.
Remove the time, the release is normal, but the phone installed after the opening of the program immediately collapsed;
Also said: Is the cordova.js file is wrong, I checked also re-copy covered, OK Android version of the file
If the page does not reference cordova.js this, together are OK.
The reason for the program crash is that the permissions in Androidmanifest.xml are missing,
Follow the tutorial to add all the permissions to be no problem;
<supports-Screensandroid:largescreens="true"Android:normalscreens="true"Android:smallscreens="true"android:resizeable="true"android:anydensity="true"/><uses-permission android:name="Android.permission.CAMERA"/><uses-permission android:name="Android.permission.VIBRATE"/><uses-permission android:name="Android.permission.ACCESS_COARSE_LOCATION"/><uses-permission android:name="Android.permission.ACCESS_FINE_LOCATION"/><uses-permission android:name="Android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/><uses-permission android:name="Android.permission.READ_PHONE_STATE"/><uses-permission android:name="Android.permission.INTERNET"/><uses-permission android:name="Android.permission.RECEIVE_SMS"/><uses-permission android:name="Android.permission.RECORD_AUDIO"/><uses-permission android:name="Android.permission.MODIFY_AUDIO_SETTINGS"/><uses-permission android:name="Android.permission.READ_CONTACTS"/><uses-permission android:name="Android.permission.WRITE_CONTACTS"/><uses-permission android:name="Android.permission.WRITE_EXTERNAL_STORAGE"/><uses-permission android:name="Android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="Android.permission.GET_ACCOUNTS"/>