Android learning experience Linux under the command line Android development Environment building

Source: Internet
Author: User

Android learning experience Linux under the command line Android development Environment building

1. Preface
2. Java and Ant installation
3. Android SDK Installation
4. Basic commands for Android engineering

First, preface

This blog post records the construction of a full-command-line Android development environment under Linux, based on the following articles:

Http://zyqhi2010.blog.163.com/blog/static/171589378201261093235290/(Build an Emacs-based Android development environment in Linux)
Https://linux.cn/article-5966-1.html (Build a full-command-line Android build system)
Http://stackoverflow.com/questions/25646856/android-sdk-tools-ant-build-xml698-null-returned-1 (android-sdk/ Tools/ant/build.xml:698:null returned:1)
http://blog.chinaunix.net/uid-20665441-id-1758913.html (command line related to Android project)
Http://my.oschina.net/u/559701/blog/75333?fromerr=iCEvYcVH (using ant to build Android projects under Linux)
http://blog.csdn.net/zhangzeyuaaa/article/details/40047585 (Manually create, build, and install Android projects)
http://blog.csdn.net/xieyan0811/article/details/7400137 (using ant to compile Android project (Linux system))

II. Java and Ant installation

For Linux under the Java installation, you can refer to the previous blog: Java learning experience of Linux to build a Java environment.

For Linux under Ant installation, you can refer to the previous blog: Linux learning experience of Linux under the installation and use of Ant.

Third, Android SDK installation

1. Download the Linux version of the Android SDK and unzip it.

2.64-bit system needs to install the corresponding package, the network has a variety of interpretations, such as libc6:i386, libncurses5:i386, libstdc++6:i386, LIB32Z1
Note: This time only installs the LIB32Z1 package, namely completes the environment construction

3. In/etc/profile, configure the environment variables as follows:

Set android environmentexport android=/home/xp/documents/sdk/androidexport PATH= $PATH: $ANDROID/ Tools: $ANDROID/platform-tools

4. Terminal input android, download the corresponding version of the Android SDK tools

Iv. basic commands for Android engineering

(1) To view the optional Android platform ID:

Android list target

(2) Build a new Android project:

1 -P./-K com.fxt.helloworld-a HelloWorld

-n Specifies the name of the project
-T Specify Android platform
-P Specify the project storage path
-k Specifies the project package name
-A Specify Activity name

(3) Compile the project


A) compiling the debug version

$ ant Debug

Generate an APK with debug signature

b) Generate release version

$ ant Release

Generate an unsigned apk, then manually sign it

Android learning experience Linux under the command line Android development Environment building

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.