Environment Construction: Reference HTTP://WWW.PHONEGAPCN.COM/START/ZH/1.3/#android
Debugging:
1, online remote debugging
http://debug.phonegap.com/connect the computer via USB and turn on the device's "USB debugging".
2. Debug with weinre ( web InspectorRemote: Web debugging tool)
Use it to remotely debug a Web page or application running in a mobile browser on a PC , enabling immediate debugging of DOM elements, CSS Styles , JavaScript , and so on.
Reference Documentation:
Weinre Installation:http://ju.outofmemory.cn/entry/1355
Weinre Principle Introduction:
Http://www.cnblogs.com/lhb25/p/debug-mobile-site-and-app-with-weinre.html
Related configuration:
1, when using the positioning function, the mobile device needs to be set: "Location Services"-- Open "Use wireless network", "Use GPS positioning" two
2. Screen lock problem
Modify The property configuration in the Androidmanifest.xml file android:screenorientation
Vertical screen Lock: android:screenorientation= "Portrait"
Horizontal screen Lock: android:screenorientation= "Landscape"
<activity android:name= "MyActivity"
Android:label= "@string/app_name"
Android:configchanges= "Orientation|keyboardhidden"
android:screenorientation= "Portrait" >
3. Android version issue
Modify the androidmanifest.xml file
By setting android:minsdkversion= "7" The program can be run on a different version of the Android system (high numbers may cause parsing packet errors on the lower version of the phone) SDK7 Correspondence Android2.1
4, modify the application icon, set the start screen, etc.
Set phonegap splash screen picture and icon
Start interface:
1) copy The interface image ( e.g. bg.jpg) that will be loaded to res/drawable
2) Add this code before the Activity specifies the entry file:
Super.setintegerproperty ("splashscreen", r.drawable.bg);
This will show the BG picture at startup, avoid the appearance of the black screen, in the 2.3.3 above the wording is can normally appear the start screen, but if replaced by other PhoneGap high version, you must also make the following settings before it appears:
Super.setintegerproperty ("splashscreen", R.drawable.splash);
Super.loadurl ("file:///android_asset/www/index.html",);
/ load loadurl The second parameter can not be less, otherwise the launch of the image in other versions is not out of the
To set the desktop icon :
Copy the icon (icon.png) to res/drawable
found under the androidmanifest.xml .
android:icon= "@drawable/ic_launcher"// default icon
Modified to android:icon= "@drawable/icon"// Specify icon
PHONEGAP Development related issues