(64-bit) Build an android development environment in Ubuntu

Source: Internet
Author: User
  1. JDK

    • Install JDK:
      Download jdk-6u25-linux-i586 http://java.sun.com/javase/downloads/index.jsp
      Privilege Escalation: Enter the CHMOD 777 jdk-6u25-linux-i586 under the command line
      Note:If you have installed a JDK package, decompress it directly. The above steps can be omitted.

    • Configure JDK environment variables:

      Sudo gedit/etc/environment
      Add the following content and save and exit
      Export java_home =/home/Gong/jdk1.6.0 _ 25
      Export classpath = ..: $ java_home/lib: $ java_home/JRE/lib
      Path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: $ java_home/bin"
      Note:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin: /usr/games must be retained; otherwise, the system cannot be logged on.
      It's classpath, not class_path!

      Run the following command to make the configuration take effect:
      Source/etc/environment or source/home/wolf/. bashrc

    • Configuration verified:
      Java-version

    • There may be a small problem: the last prompt is jdk1.6.0 _ 25/bin/Java: Permission denied. That is to say, the CHMOD 777 jdk1.6.0 _ 25/-- Recursive is OK, upgrade the permissions of all files under JDK 1.6.0 _ 25.

  2. Androidsdk
    • My SDK is copied directly from someone else, and none of them can go to googleandroid to download it. Now let's talk about environment variable configuration.
      Sudo gedit/etc/environment
      Add PATH variable
      Append the paths of tools and platform-tools.
    • This may also encounter a small problem: Is for 64-bit Ubuntu, because the 64-bit system, and Android SDK only 32-bit program, need to install the ia32-libs to use. Run the sudo apt-Get install ia32-libs and press Enter. OK.
  3. Eclipse
    • Download eclipse. Click here to download
    • After decompression, install ADT. Open eclipse-> help-> install new software-> Add and enter a list of development tools. Generally, you only need to select its sub-nodes Android ddms and Android development tools, and then click Next to install them, restart eclipse. The android ddms is used to debug the android program. It can be used to connect to the android simulator. It is well integrated with eclipse and can be used to debug Android applications directly in eclipse.
    • Configure ADT:

      Decompress the downloaded Android SDK to a certain location.

      In eclipse, "window"-"Preferences", select "android" on the left, and select the SDK location as the extracted location. Then the application is OK.

      After the configuration is complete, you can prepare to create a mobile phone simulator.

    • Create a mobile phone simulator: Open AVD manager and create a new simulator. After creating a new simulator, you can start it to see the effect. The first startup may be slow, but it will be fine in the future.
    • After the simulator is started, you can try ADB, which will be used in many places in the future. Crtl + ALT + T shortcut to call up the command line, enter ADB shell to get the simulator shell, you can simply use ls to view the file and folder list under the root directory, other ADB commands and shell commands need to be checked on the Internet.
  4. Ndk
    • NdkFull name: Native Development Kit
    • If you do not have an SDK package, click here googleandroid

    • Environment configuration: add your ndk path to the path in/etc/environment as before
    • My collected development documents
    • Ndk development requires the knowledge of JNI.
  5. Http://developer.android.com/index.html
Related Article

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.