MyEclipse + phonegap-2.9.0 always jump 3 script hints

Source: Internet
Author: User

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"/>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.