PhoneGap Development of Android project environment to build a simple process

Source: Internet
Author: User

First of all 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 created under the project directory/libs and/assets/ WWW3. Copy the Cordovajs from the Android directory in the PhoneGap to/assets/www, and copy the Cordova.jar from the same directory to the/libs 4. Copy the XML folder from the Android directory in the PhoneGap to/ Res 5.android default project is for the native app, so to use the Web App (Cordova), you must modify its reference file. 5.1 Reference load Cordova.jar, this time can press F5 Refresh project. 5.2 Remove Import android.app.Activity of import part and add import org.apache.cordova.*; 5.3 Modify the Java file under the src file to 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"/> to Uses-sdk and application.

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.