PhoneGap Development of Android project environment to build a simple process

Source: Internet
Author: User

First, you have downloaded the latest PhoneGap source code.
Installation and configuration of the Eclipse,android SDK and ADT have been installed.

1. Enter the eclipse interface and create a new Android Project new > Android Project2. Two documents under the project folder/libs and/assets/ WWW3. Copy the Cordovajs under the PhoneGap in the Android folder to/assets/www, and copy the Cordova.jar under the same folder to/ Libs under 4. Copy the XML folder under the Android folder in PhoneGap to/res under 5.android The default item is for the native app. So if you want to use the Web App (Cordova), you have to change its reference file.

5.1 References load Cordova.jar, you can press F5 to refresh project. 5.2 Remove Import android.app.Activity of import part and add import org.apache.cordova.*; 5.3 Change the Java file under Src file. Change the activity of class extends to DroidGap5.4 Setcontentview () line with Super.loadurl ("file:///android_asset/www/ Index.html "); 6. Open androidmanifest.xml, copy <supports-screens android: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.INTERNET "/>< Uses-permission android:name= "Android.permission.RECEIVE_SMS"/><uses-permission android:name= "andRoid.permission.RECORD_AUDIO "/><uses-permission android:name=" Android.permission.RECORD_VIDEO "/>< 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 "/><uses-permission android:name=" Android.permission.BROADCAST_STICKY "/> Between USES-SDK and application.

PhoneGap developed Android Project Environment to build a simple process

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.