android studio

What is Android Studio | Utilities in Android Studio 2021

Android Studio, which is based on IntelliJ IDEA, is the official Integrated Development Environment (IDE) for Android app development. A unified environment for developing for all Android devices. Apply Changes to make code and resource changes to your running app without having to restart it.

This appendix contains a list of tasks that you may encounter while developing apps in the Android Developer Fundamentals practical codelabs.

How to Create a New Project in Android Studio?

We create or start a new project in android studio to create a new Mobile Application for Android. To create a new project we need to enter the Application name, Package name, fill Minimum SDK, Activity details, and Activity Name & Layout Name in the text box. Below is the step-by-step guide.

To start a new project, follow these steps:

  • After successfully installing and opening the Android studio.
  • If no projects are open, Android Studio displays the Welcome screen, where you can start a new project by clicking Start a new Android Studio project.
  • If you already have a project open, you can start a new one by going to the main menu and selecting File > New > New Project.

You should then see the New Project wizard, which lets you choose the type of project you want to create and populates with code and resources to get you started. This page guides you through creating a new project using the New Project wizard.

android studio new project

Figure 1. In the first screen of the wizard, choose the type of project you want to create.

  • By selecting the type of project you want to create, Android Studio can include sample code and resources to help you get started.
  • After you make a selection, click Next.

Configure your project:

The next step is to configure some settings and create your new project, as described below and shown in figure 2:

new project

Figure 2. Configure your new project with a few settings.

  • Specify the Name of your project.
  • Enter the Package name . This package name is also your application ID by default, which you can change later.
  • Set the Save location to the location where you want to save your project locally.
  • Choose the language that Android Studio should use when creating sample code for your new project. Remember that you are not limited to using only that language to create the project.
  • Choose the minimum API level that your app should support. When you choose a lower API level, your app will be able to use fewer modern Android APIs. However, your app will be able to run on a larger percentage of Android devices. When choosing a higher API level.
  • Check the box next to Use AndroidX artefacts if you want your project to use AndroidX libraries by default, which are improved replacements for the Android Support libraries. Read the AndroidX overview to learn more.
  • When you’re ready to start working on your project, click Finish.
  • To get you started, Android Studio creates a new project with some basic code and resources as shown in figure 3.
MainActivity file
xml file in android

How to delete a project in Android Studio

All of the files for an Android project are stored on the computer’s file system in the project’s directory. To delete a project, remove its directory from the file system of your computer.

Android Studio also keeps track of the most recent projects you’ve opened. You can remove a project from the list of recent projects, but this has no effect on the project files themselves. This is an optional step.

To remove/delete a project from Android Studio’s follow the steps given below:

  • Open the Android studio, in main menu select File-> Open->Select a project you want to delete -> Right Click on this project-> Delete->OK
delete project in android

How to add Android support libraries/Dependencies

The Android Support Library contains backward-compatible versions of the Android framework APIs, additional UI components, and a collection of useful utilities.

The RecyclerView class, for example, is found in the Android Support package. You must include the RecyclerView support library dependency in your project’s build.gradle file to use RecyclerView. The procedure for other Android Support Library components is the same.

Follow these steps and refer to the screenshot below to add RecyclerView support libraries to your Gradle file:

android studios
  • Make sure you’re in the Project pane in Android Studio for your project.
  • Locate the Gradle Scripts folder in the file hierarchy.
  • Expand Gradle Scripts and open the build.gradle (Module: app) file.
  • The dependencies section can be found near the end of the build.gradle (Module: app) file.
  • Below that line, add the following code:
//recycler view
implementation “androidx.recyclerview:recyclerview:1.2.1”
  • Change the new line’s version number to match the latest version or version number of the existing library.
  • Check that all of the library version numbers are the same and match the compileSdkVersion number. If they don’t, you’ll get an error message.
  • Synchronize your Gradle files.
  • Build and run your app.

The following example shows the dependencies section of the build.gradle file with support libraries added for RecyclerView if the version number were 1.2.1

dependencies {
    //recycler view
    implementation "androidx.recyclerview:recyclerview:1.2.1"

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.6.0'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation ''
    implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

How to create images in Asset Studio

  • Create image assets for a launcher icon, a notification icon, or action bar icons with Image Asset Studio:
  • Launch Android Studio and select your app.
  • Right-click your project’s res folder and choose New > Image Asset from the menu.
  • The window for Asset Studio appears. You can make a text icon, use available clip art, or upload your own image.

If you are interested in learning android development tutorial go through it- Android Development Tutorials

Build Your First Android App

We hope that this guide will assist you in understanding all about android Studio. We have concentrated on making a basic, meaningful, and easy-to-learn guide for android studio. Still, if you have any problems regarding this, please post them in the comments section, we will be glad to assist you.

Leave a Reply