JDK and Android SDK Installation on Ubuntu


I’ve been developing Android application on Windows. But recently, I tried to create an environment in Linux (Ubuntu/Xubuntu). In this article, I will describe the installation of JDK and Android SDK that is required before installing IDE. (It is assumed that without the use of ADT Bundle, we install separately JDK/SDK and IDE.)

Installation of JDK

JDK is updated frequently. So I looked for package management. Then I found that Oracle Java (JDK) 6 / 7 / 8 Installer PPA : “WebUpd8” team provides PPA. This PPA downloads and run the Oracle installer.

Install as follows. Along the way, you are prompted to agree to Oracle license. Then agree.

In the last line, you are sure the installation was successful.
At the result, in my environment, the JDK is installed in /usr/lib/jvm/java-7-oracle.

Installation of Android SDK

Following Android SDK | Android Developers, I have installed the Android SDK.

  1. First, there is the following entry in SYSTEM REQUIREMENTS – Linux.

    64-bit distributions must be capable of running 32-bit applications.

    My Environment is 64bit-Xubuntu. So I installed ia32-libs. (It is not necessary for 32bit OS.)

  2. Next, from DOWNLOAD FOR OTHER PLATFORMS, download Linux 32 & 64-bit package. (Suppose /home/hoge/Downloads/android-sdk_r21.1-linux.tgz)
    * Currently, there is a package called ADT Bundle environment, including Eclipse. However, in this article, it is assumed that you install IDE separately.
  3. In the home directory, make appropriate directory (here, suppose “Development”), and extract files there.

  4. It is useful to make a path to “tools” directory. So add the following line in ~/.bashrc.

    In order to apply the path, do the following.

  5. Update the SDK. (Because SDK for all platform will be downloaded, it will take a lot of time.)

  6. Start the SDK Manager to check the results. (In my environment, the sources has not been downloaded. So I downloaded them.)

  7. For other commands for android, check with –help option.

After this, you can set up favorite IDE, such as IntelliJ or Eclipse, and start development.

[Reference Sites]

[Relative articles]


Migrating Android Dev’s IDE from Eclipse to IntelliJ(2)


In the previous article, I described the installation and basic configuration of IntelliJ IDEA. Android development is ready now. Then I will describe how to use it actually.

Creating a New Project

When you click “Create New Project” in Welcome screen, “New Project” window opens. Select “Application Module” in “Android” section, and specify “Project name” and “Project Location”, then press “Next”.

new_proj1_compressed

Enter “Application name”, “Package name” and other requried matters. Then press “Finish”.
new_proj2_compressed
Wait for a while, after the Tip of the Day, the project will start.

Importing an Existing Project

If you want to import an existing project, by “Import Project”, specify the folder that contains the source project and ther matters required settings. (If Eclipse project and there is “.project” file, by “Open Project”, you can import it by sepecifying the “.project” file. However, “Import Project” is more useful because you can specify the matters in detail. )

Setting “.gitignore”

If you want to manage the project in Git, you need to place “.gitignore” appropriate for your development environment. You can use gitignore/Android.gitignore at master · github/gitignore · GitHub. You can also refer to Log folder of Proguard and .gitignore on IntelliJ | DeVlog.

Open Project Folder

You can click the “Project” in the upper left to open the project folder.
open_project_en_compressed
From here you will be able to open the source files, such as.folder_compressed

Use SDK/AVD Manager

From the “Tools” menu, you can call “Android SDK Manager” or “AVD Manager”.
sdk_avd_compressed

Run Application

From the “Run” menu, you can run the application.
run_compressed

Export Signed APK

To exprot signed APK, from the “Build” menu, click “Generate Signed APK …”.

apk_compressed
Specify or create the path of keystore, password, and key alias.
apk2_compressed

I think you got a clue if you know above. At first, there may be a confusion. Please developing with reference also Getting Help .

[Reference Articles]


Migrating Android Development Environment from Eclipse to IntelliJ(1)


IntelliJ is Light

The standard IDE for development of Android is Eclipse. However, when you use IntelliJ that is another IDE for Android development, it is comfortable with moving lightly and easy-to-understanding menu structure. You can use the Community Edition (Open Source) for free to develop Android Application.
intelliJ_compressed
In this article, I describe the tasks required who have been using the Eclipse for Android development ever to migrate to IntelliJ.

Installation of IntelliJ

Summary of the installation is as follows.

  1. Installation of JDK
  2. Installation of Android SDK
  3. Installation and Configuration of IntelliJ

You need a plugin called ADT to Eclipse. But It is not necessary for IntelliJ. I think if people who have already been developing in Eclipse, installing JDK and Android SDK is already done. (Or if on Ubuntu, see JDK and Android SDK Installation on Ubuntu | DeVlog.) Therefor, you can start developing as soon as install and configure IntelliJ. I will show the insallation instructions for IntelliJ below.

  1. Download a file for your platform from IntelliJ IDEA :: Download Latest Version of IntelliJ IDEA. You can use the Community Editon (free) for Android development without limitation. The case of Windows, so just follow the instructions of the installer, it is not particularly difficult to install the software. The case of Ubuntu, you can install from the software center. I think you can easily install on other platforms. Please follow the instructions on the site.
  2. After installation, the following dialog box will open with the first start, if you install the first time, press OK to select the “I do not…”.
    complete_installation
    Welcome screen opens.
    welcome_compressed

    Configuration of IntelliJ

    After opening Welcome screen, keep the basic settings.

    Project Defaults

    Before dealing with the actual project, you need to let IntelliJ to recognize JDK and Android SDK. To do so, you may set the project defaults.
    Configure > Project Defaultes > Project Structure, in “Project SDK” select New > JDK.
    set_jdk_compressed
    After opening folder selection, select the folder JDK installed.
    jdk_select_compressed
    Click “New” again and select “Android SDK” to set directory.
    set_sdk_compressed
    sdk_select_compressed
    JDK and SDK is set.
    jdk_sdk_compressed

    Change Theme

    Try to set the theme easy to see. I recommend “Darcula”.
    Select from Configure > Settings > Appearance > UI Options. After apply, you are prompted to restart.
    theme_compressed

    At this point, you are ready for developing Android. Next time, I will expain how to use IntelliJ.

    [Relative Sites]