Android Learning

What is Android Studio And How To Install It? – NSC

Android Studio is Android’s official IDE. It is purpose-built for Android to accelerate your development and help you build the highest-quality apps for every Android device.

Android Studio is a visual code editor where low level of knowledge students can makes Android Apps easily. Android Studio is launched by Google on 16th May, 2013, Thereafter, First stable versionof Android Studio is launched on December 2014 Version 1st.

Android Studio is the official IDE (integrated development environment) for Google’s Android operating system, built on JetBrains’ IntelliJ IDEA software and designed specifically for Android Apps development.

Android Studio is Android’s official IDE. It is purpose-built for Android to accelerate your development and help you build the highest-quality apps for every Android device.

You can also download Android Studio for free for your pc or mac from below.

System Requirements For Installing Android Studio:

Windows

To install Android Studio on Windows, proceed as follows:

  1. If you downloaded an .exe file (recommended), double-click to launch it.If you downloaded a .zip file, unpack the ZIP, copy the android-studio folder into your Program Files folder, and then open the android-studio > bin folder and launch studio64.exe (for 64-bit machines) or studio.exe (for 32-bit machines).
  2. Follow the setup wizard in Android Studio and install any SDK packages that it recommends.

That’s it. The following video shows each step of the setup procedure when using the recommended .exe download.

Mac

To install Android Studio on your Mac, proceed as follows:

  1. Launch the Android Studio DMG file.
  2. Drag and drop Android Studio into the Applications folder, then launch Android Studio.
  3. Select whether you want to import previous Android Studio settings, then click OK.
  4. The Android Studio Setup Wizard guides you through the rest of the setup, which includes downloading Android SDK components that are required for the development.

That’s it. The following video shows each step of the recommended setup procedure.

Linux

To install Android Studio on Linux, proceed as follows:

  1. Unpack the .zip the file you downloaded to an appropriate location for your applications, such as within /usr/local/ for your user profile, or /opt/ for shared users. If you’re using a 64-bit version of Linux, make sure you first install the required libraries for 64-bit machines.
  2. To launch Android Studio, open a terminal, navigate to the android-studio/bin/ directory, and execute studio.sh.
  3. Select whether you want to import previous Android Studio settings or not, then click OK.
  4. The Android Studio Setup Wizard guides you through the rest of the setup, which includes downloading Android SDK components that are required for the development.

Tip: To make Android Studio available in your list of applications, select Tools > Create Desktop Entry from the Android Studio menu bar.

Required libraries for 64-bit machines

If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386

If you are running 64-bit Fedora, the command is:

sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686

That’s it. The following video shows each step of the recommended setup procedure.

Chrome OS

Follow these steps to install Android Studio on Chrome OS:

  1. Open the Files app and locate the DEB package you downloaded in the Downloads folder under My files.
  2. Right-click the DEB package and select Install with Linux (Beta).
  3. Select whether you want to import previous Android Studio settings, then click OK.
  4. The Android Studio Setup Wizard guides you through the rest of the setup, which includes downloading Android SDK components that are required for the development.
  5. After installation is complete, launch Android Studio either from the Launcher or from the Chrome OS Linux terminal by running studio.sh in the default installation directory:/opt/android-studio/bin/studio.sh

That’s it.

Configure Android Studio

Android Studio provides access to two configuration files through the Help menu:

  • studio.vmoptions: Customize options for Studio’s Java Virtual Machine (JVM), such as heap size and cache size. Note that on Linux machines this file may be named studio64.vmoptions, depending on your version of Android Studio.
  • idea.properties: Customize Android Studio properties, such as the plugins folder path or maximum supported file size.

Customize your VM options

The studio.vmoptions the file allows you to customize options for Android Studio’s JVM. To improve Studio’s performance, the most common option to adjust is the maximum heap size, but you can also use the studio.vmoptions file to override other default settings such as initial heap size, cache size, and Java garbage collection switches.

To create a new studio.vmoptions file or to open your existing one, use the following steps:

  1. Click Help > Edit Custom VM Options. If you have never edited VM options for Android Studio before, the IDE prompts you to create a new file. Click Yes to create the file.
  2. The studio.vmoptions the file opens in the editor window of Android Studio. Edit the file to add your own customized VM options. For a full list of customizable JVM options.

The studio.vmoptions the file you create gets added to the default studio.vmoptions file, located in the bin/ the directory inside your Android Studio installation folder.

Maximum heap size

By default, Android Studio has a maximum heap size of 1280MB. If you are working on a large project, or your system has a lot of RAM, you can improve performance by increasing the maximum heap size for Android Studio processes, such as the core IDE, Gradle daemon, and Kotlin daemon.

Android Studio automatically checks for possible heap size optimizations and notifies you if it detects that performance can be improved.

The memory settings, which let you configure maximum amount of RAM
          for Android Studio processes.

Figure 1. A notification about recommended memory settings.

If you use a 64-bit system that has at least 5 GB of RAM, you can also adjust the heap sizes for your project manually. To do so, follow these steps:

  1. Click File > Settings from the menu bar (or Android Studio > Preferences on macOS).
  2. Click Appearance & Behavior > System Settings > Memory Settings.
  1. Adjust the heap sizes to match your desired amounts.
  2. Click Apply. If you changed the heap size for the IDE, you must restart Android Studio before the new memory settings are applied.

Note: Allocating too much memory can degrade performance.

  • Turn on Offline Mode for Gradle: If you have limited bandwidth, turn on Offline Mode to prevent Gradle from attempting to download missing dependencies during your build. When Offline Mode is on, Gradle will issue a build failure if you are missing any dependencies, instead of attempting to download them. To turn on Offline Mode, do the following:
    1. Click File > Settings (on macOS, Android Studio > Preferences) to open the Settings dialog.
    2. In the left pane, expand Build, Execution, Deployment and then click Gradle.
    3. Under Global Gradle settings, check the Offline work checkbox.
    4. Click Apply or OK for your changes to take effect.
  • Reduce the maximum heap size available for Gradle: Gradle’s default maximum heap size is 1,536 MB. Reduce the value by overriding the org.gradle.jvmargs property in the gradle.properties file, as shown below:
# Make sure to gradually decrease this value and note
# changes in performance. Allocating too lttle memory may
# also decrease performance.
org.gradle.jvmargs = -Xmx1536m

Optimize Android Studio performance on Windows

Some antivirus software can interfere with the Android Studio build process, causing builds to run dramatically slower. When you run a build-in Android Studio, Gradle compiles your app’s resources and source code and then packages the compiled resources together in an APK. During this process, many files are created on your computer. If your antivirus software has real-time scanning enabled, the antivirus can force the build process to halt each time a file is created while the antivirus scans that file.

To avoid this issue, you can exclude certain directories from real-time scanning in your antivirus software. Caution: To ensure that your computer is safe from malicious software, you should not completely disable real-time scanning or your antivirus software.

The following list shows the default location of each Android Studio directory that you should exclude from real-time scanning:

Gradle cache%USERPROFILE%\.gradleAndroid Studio 

projects%USERPROFILE%\AndroidStudioProjectsAndroid 

SDK%USERPROFILE%\AppData\Local\Android\SDKAndroid Studio system

files%USERPROFILE%\.AndroidStudio<version>\system

Leave a Comment