Install & Setup Android Studio Java JDK & SDK

Android Studio, Java JDK & SDK is the part of Android Development to building Android Apps. In this post, we are going to learn “How to install and setup Android Studio, Java JDK & SDK“. We will also see how to download the Android studio and Java JDK as well as we will set up of SDK (Software Development Kit) in Android Studio. If you are a beginner, you don’t know, what is Android Studio, Java, and SDK. So Let me give you an overview.

  • Java.
  • Android Studio
  • SDK

Read More: 

Java

Android developers mostly used Java programming languages to build Android apps. If we want to use java tools or functionality, So We have to install JDK. What is JDK? JDK is the Java Development Kit.

Android Studio

Android studio is an IDE. What is IDE? IDE is an integrated development environment. In simple words, this is a tool that gives us an environment to create an Android app. There are many tools are available in the market for different purposes like ms word for documentation creation, PowerPoint for presentation making, and tally ERP 9 for accounting and photoshop for photo editing and many more, same as Android studio is a tool for android app development.

SDK

The Android SDK stands for a software development kit. It is a set of development tools that are used to develop applications. The Android SDK includes the following:

  • Required libraries
  • Debugger
  • An emulator
  • Offline documentation for the Android application program
  • Tutorials for the Android OS
  • more

The Android SDK includes the following:

  • Platform-tools

Platform tools are used to help the features for the current android platform including ADB, which is working as a bridge to communicate with emulator or device.

  • Build-tools

Android SDK Tools is a part of the Android SDK. It is required for building Android apps.

  • SDK-tools

SDK Tools is a part of the Android SDK. It includes the complete set of development and debugging tools like an emulator, sdcard, SQLite and apk builder, etc.

  • The Android Debug Bridge (ADB)

ADB is a tool that you communicate with a device. The ADB gives many device actions, such as installing and debugging apps.

  • Android Emulator

The Android Emulator is a virtual Android device it’s called an emulator. It provides to live to test your application on different devices including the Android API level without needing to have each physical device. The emulator provides you almost all of the functionality of a real Android device.

Let’s see how we will Install & Setup Android Studio Java JDK & SDK.

  • Pre-Installation Check List
  1. Before installing the Android SDK, you need to install the JDK (Java Development Kit). if you want to check java version then go run (start button+R) and open CMD after open command prompt simple type “javac -version“.
  2. We need to install two packages:
    1. Android Studio, which is an Integrated Development Environment (IDE) based on IntelliJ is a popular Java IDE.
    2. Android SDK (Software Development Kit) is used for developing and testing Android apps.

How to Install JDK

The Java Development Kit (JDK), officially called  “Java SE“, is needed for writing Java programs. The JDK is freely available from Sun Microsystems. Now is it is part of Oracle. check it-  http://www.oracle.com/technetwork/java/javase/overview/index.html.

Un-Install Older Version(s) of JDK/JRE

Install only the newest JDK. If you have previously installed an older version(s) of JDK/JRE, So un-install ALL of them.

Go to Control Panel >> “Programs” >> Select Programs and Features” >> Un-install ALL programs begin with “Java”, like “Java SE Development Kit, etc.

Step 1: Download JDK

  1. Goto Java SE download site  http://www.oracle.com/technetwork/java/javase/downloads/index.html.
  2. Click the “Oracle JDK Download” button.
  3. Check “Accept License Agreement”.
  4. Choose the JDK for as per your system requirement your.e., “Windows”. Download the “exe” installer jdk-13.0_windows-x64_bin.exe” -.

Step 2: Install JDK

Dubble click on download setup and Run.

By default, JDK is installed in the directory “C:\Program Files\Java\jdk-13.0.“, Accept the defaults, and follow the screen instructions to install JDK.

Step 3: Verify the JDK Installation

Open a CMD via following below step:

  1. Click the Search button and Type “cmd” >> Choose “Command Prompt”, or
  2. Right-click “Start” button ⇒ run… >> enter “cmd”.

the following commands to verify that JDK/JRE is properly installed and display their version.

 
Install & Setup Android Studio, Java JDK & SDK
Install & Setup Android Studio, Java JDK & SDK

Install “Android Studio IDE”

Reference: “Install Android Studio” at https://developer.android.com/studio/install.

(For Windows)

  1. Verify that environment variable JAVA_HOME is set to the JDK installation directory by the using command “set JAVA_HOME“.
  2. Check the system requirements for Android Studio/SDK  https://developer.android.com/studio#Requirements e.g., For Windows 10, recommended 8GB of RAM, 4GB of disk space, and 1280×800 minimum screen resolution.
  3. Go to “Android Studio” @ https://developer.android.com/studio ⇒ Click “Download Android Studio 3.6.x for Windows 64-bit (749MB)”, e.g., “android-studio-ide-192.xxxxxxx-windows.exe“.
  4. Run .exe step >> Launch Android Studio. Continue to the Next Step.

Android Studio IDE by default will be installed in “C:\Program Files\Android\Android Studio“.

Android SDK by default will be installed in “c:\Users\username\AppData\Local\Android\Sdk“.

Installing the Android SDK

This step takes time because download size is 3GB of zip data and expand to 5 GB of disk data.

Note: You can actually copy the SDK from your friends or any other computer with the same OS.

  1. Start Android Studio.
  2. In Android Studio >> Select Tools > Android > SDK Manager.
  3. As you can see default Settings dialog box, click these tabs to install Android SDK platform packages and developer tools.
  1. SDK Platforms: Select the latest Android SDK package.
  2. SDK Tools: Select these Android SDK tools:
    • Android SDK Build-Tools
    • NDK (Side by side)
    • Android SDK Platform-Tools
    • Android SDK Tools

4. Click Apply. Android Studio starts installing your selected packages. After completing the installation, Status of the installed packages and tools changes from Not Installed to Installed.

5. Click OK.

Now ready to launch your First Android App

Android apps are written in Java, and use XML for UI Design. I will hope that you have some basic knowledge of Java and XML.

Take note that the Android emulator is slow very slow. Be Patient!!!

Create a New Android Project

  1. Launch Android Studio.
  2. Choose “Start a new Android Studio Project”.
  3. Select a Project Template >> select “Phone and Tablet” tab >> Empty Activity >> Next.
  4. Configure your project 1- ⇒ Set “Name” to “Hello Android” (this will be the “Title” in your phone’s app menu) 2- ⇒ The “Package name” and “Save Location” will be updated automatically 3- ⇒ In “Language”, select “Java” 4- ⇒ Leave the “Minimum API Level” and the rest to default ⇒ Finish.
  5. It could take a few minutes to set up your first app.

 Run the App on Real Android Phones

Run the app on a real device. Follow step by step.

  1. Connect the real device to your computer. Make sure that you have the “USB Driver” for your device installed on your computer. If not, go to https://developer.android.com/studio/run/oem-usb.html to Install OEM USB Drivers.
  2. Enable “USB Debugging” mode on your real device:
    Enable “Developer options” through “Settings” ⇒ About Phone ⇒ Scroll to the bottom and tap “Build number” seven (3 or 4) times until “Developer Mode” is displayed.
  3. Return to the previous screen to find “Developer options” ⇒ Open “Developer options” ⇒ Enable “USB debugging”.
    Go to “Settings” >> Select Developer options” >> Check “USB Debugging”.
    Go to “Settings” >> “Applications” >> “Development” >> Check “USB Debugging”.
  4. In Android Studio, select the “Run” menu >> “Run app” >> Your device will be listed under “Choose a running device” >> Select the device and press OK >> “Hello-world” will appear on your phone.

I hope you liked the post. If you have any questions regarding this post. Feel free to comment and share the post with your friends.

Happy Learning!!!  🙂

Leave a Reply