Android Development Installation Guide



Download 18.25 Kb.
Date20.06.2017
Size18.25 Kb.
#21145
Android Development Installation Guide
Overview:


  1. Installing the latest JDK (Java Development Kit)

  2. Installing Eclipse

  3. Installing the Android SDK (Service Development Kit)

  4. Setting up a virtual device (with SD card external storage)

  5. Installing the ADT Plugin for Eclipse (Android Development Tools)

  6. Configuring the ADT Plugin for Eclipse

  7. Creating an Android project

  8. Running an Android application on an emulated device

  9. Running an Android application on your phone

Additional Resources


  1. Installing the latest JDK




    1. Navigate to http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html and download the OS-specific kit (Self Extracting Installer if possible).




    1. Run the installer.

*Developer Tools and Public JRE must be installed.


  1. Installing Eclipse




    1. Navigate to http://www.eclipse.org/downloads/ and download the OS-specific package labeled “Eclipse IDE for Java Developers”.




    1. Extract it to an easily-identifiable location on your computer (Desktop, Program Files, etc.)




  1. Installing the Android SDK




    1. Navigate to http://developer.android.com/sdk/index.html and download the OS-specific kit, extracting it to a well-known location on your computer. Make a note of this location, as we will use it later in step 6.




    1. Run the SDK Manager, and install all of the SDK Platform packages (it’s easiest to just install all of the available packages). This will probably take a while, so be patient.

*You might have to run it with administrative privileges


    1. Once it’s finished installing the packages, do not exit! We will continue to use the SDK Manager in step 4.



  1. Setting up a virtual device




  1. Select “Virtual devices” from the toolbar on the left, and click the “New” button on the right.





  1. Set up the device with the following settings:

*These settings are for the latest Android-based phones


    1. Target: Android 2.3.3 API Level 10

(If you plan on using Google API features like Google Maps, make sure to use the Google APIs Level 10 version instead)

    1. SD Card: 500MiB

    2. Skin: Built-in Default (WVGA800)



  1. Installing the ADT Plugin for Eclipse




  1. Start Eclipse, and navigate to Help => Install New Software




  1. Click “Add”, and enter a generic name for the name, and use the following link for the location: https://dl-ssl.google.com/android/eclipse/

*If this location does not work, try using the “http” version instead


  1. Click “Ok”, and you should see an entry labeled “Developer Tools” appear in the window. Check the checkbox, and click “Next” to proceed.




  1. Click “Next” to proceed, and then read through the agreements, or simply select the option saying that you have read them, and click “Finish”.

*You might get a security warning popup; if so, just ignore it and click “Ok”


  1. Configuring the ADT Plugin for Eclipse




  1. Start Eclipse, and navigate to Window => Preferences => Android




  1. Navigate to the location which you installed the android SDK (it installs under the name “android-sdk”, and click “Ok”




  1. Click “Apply” at the bottom of the window, and a list of your installed android platforms should appear on the screen. You can now just click “Ok”, as this stage of the process is complete.




  1. Creating an Android project




  1. Assuming Eclipse is already running, navigate to File => New => Project => Android Project




  1. Name your project, select which platform you are using (this must coincide with the virtual device you created in step 4)




  1. Name your application, your package (use something simple like “test.android”), and ensure “Create Activity” is checked, and enter a name for your primary activity.




  1. Click “Finish”, and your project should be created!



  1. Running an Android application on an emulated device




  1. Click the “Run” button or navigate to Run => Run to begin the program. You must then select “Android Application”, and the emulated android device should appear on the screen. Exit out of this device however.




  1. If you want to change any of the run settings of the application (you do), just navigate to Run => Run Configurations, and select your application from the window on the left. Click the “Target” tab, and select the device you want to run your application on. You can use this to select the default activity which is run on startup of the application, and add special command-line options to the run configuration (you can use “-scale .##” where ## is a percentage to scale the size of your emulator on the screen.




  1. It is very important to note that it takes quite a long time for the device to boot up when originally running your application. You must be very patient with it, and even once booted up, the device can be very sluggish at times. Once the device is running, do not exit it until you are completely finished programming, as you can reload your application onto the “running” device by simply re-running the application, saving a great deal of time.




  1. Running an Android application on your phone




  1. First and foremost, ensure that the application is compatible with your android-based device.




  1. Assuming Eclipse is already running; connect your android-based device to your computer via USB cable.




  1. On your phone, make sure that USB Debugging is enabled (usually found under Settings => Applications => Development




  1. In your project, navigate to your AndroidManifest.xml file, click the Application tab, and set “Debuggable” to true.




  1. Install the appropriate driver software for your phone/OS combination.

  • For Windows drivers, see http://developer.android.com/sdk/win-usb.html for downloads, and

http://developer.android.com/sdk/win-usb.html#InstallingDriver for installation

  • For Mac, you can skip this step

  • For Linux, see http://developer.android.com/guide/developing/device.html for installation instructions and vendor IDs




  1. In Eclipse, make sure that your run configuration is set to run on “Manual”, allowing you to choose the device to run your application on each time. You can do this by navigating to Run => Run Configuration => Your Project => Target, and selecting the “Manual” radio button.



Additional Resources
http://developer.android.com/

Download 18.25 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page