在ubuntu下配置Android开发环境

来源:互联网 发布:专业软件测试培训 编辑:程序博客网 时间:2024/05/16 06:17
 

Here's an overview of the steps you must follow to set up the Android SDK:

  1. Prepare your development computer and ensure it meets the system requirements.
  2. Install the SDK starter package from the table above. (If you're on Windows, download the installer for help with the initial setup.)
  3. Install the ADT Plugin for Eclipse (if you'll be developing in Eclipse).
  4. Add Android platforms and other components to your SDK.
  5. Explore the contents of the Android SDK (optional).

Step1:Install jdk and Eclipse!

$ Dowload JDK and Eclipse.

Follow these steps to download the ADT plugin and install it in your Eclipse environment.

  1. Start Eclipse, then select Help > Install New Software....
  2. Click Add, in the top-right corner.
  3. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:
    https://dl-ssl.google.com/android/eclipse/
  4. Click OK

    Note: If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).

  5. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
  6. In the next window, you'll see a list of the tools to be downloaded. Click Next.
  7. Read and accept the license agreements, then click Finish.

    Note: If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.

  8. When the installation completes, restart Eclipse.

Configuring the ADT Plugin

After you've successfully downloaded the ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:

  1. Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse > Preferences).
  2. Select Android from the left panel.

    You may see a dialog asking whether you want to send usage statistics to Google. If so, make your choice and click Proceed. You cannot continue with this procedure until you click Proceed.

  3. For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.
  4. Click Apply, then OK.

If you are having trouble downloading the ADT plugin after following the steps above, here are some suggestions:

  • If Eclipse can not find the remote update site containing the ADT plugin, try changing the remote site URL to use http, rather than https. That is, set the Location for the remote site to:
    http://dl-ssl.google.com/android/eclipse/
  • If you are behind a firewall (such as a corporate firewall), make sure that you have properly configured your proxy settings in Eclipse. In Eclipse, you can configure proxy information from the main Eclipse menu in Window (on Mac OS X, Eclipse) > Preferences > General > Network Connections.

If you are still unable to use Eclipse to download the ADT plugin as a remote update site, you can download the ADT zip file to your local machine and manually install it:

  1. Download the current ADT Plugin zip file from the table below (do not unpack it).NamePackageSizeMD5 ChecksumADT 12.0.0ADT-12.0.0.zip5651973 bytes8ad85d0f3da4a2b8dadfddcc2d66dbcb
  2. Follow steps 1 and 2 in the default install instructions (above).
  3. In the Add Site dialog, click Archive.
  4. Browse and select the downloaded zip file.
  5. Enter a name for the local update site (e.g., "Android Plugin") in the "Name" field.
  6. Click OK.
  7. Follow the remaining procedures as listed for default installation above, starting from step 4.

# can you see the robot which means the android-plugin installed successfully.

 

Step2: Install Android SDK onto local disk.

                

   Here's an overview of the steps you must follow to set up the Android SDK:

  1. Prepare your development computer and ensure it meets the system requirements.
  2. Install the SDK starter package from the table above. (If you're on Windows, download the installer for help with the initial setup.)
  3. Install the ADT Plugin for Eclipse (if you'll be developing in Eclipse).
  4. Add Android platforms and other components to your SDK.
  5. Explore the contents of the Android SDK (optional).

Step3: Adding Platforms and Other Components

You can launch the Android SDK and AVD Manager in one of the following ways:

  • From within Eclipse, select Window > Android SDK and AVD Manager.
  • On Windows, double-click the SDK Manager.exe file at the root of the Android SDK directory.
  • On Mac or Linux, open a terminal and navigate to the tools/ directory in the Android SDK, then execute:
    android