Professional Documents
Culture Documents
Exp 1-1
Exp 1-1
Exp 1-1
Institution Vision
Institution Mission
Vision
Mission
COURSE OUTCOMES
On completion of the course, the student will be able to:
Experiment Outcomes
M1.01 Set up Android Studio in Windows
M1.02 Create custom Android Virtual Device (AVD) & Emulate device with different screen
size
Aim
To setup Android Studio in Windows and create an Android virtual device with a
different screen size.
Theory
Android Studio is the official integrated development environment (IDE)
for Android app development. It is used by developers to design, build, test, and debug
Android applications.
1. User Interface: The Android Studio main window is made up of several logical areas
identified in figure. The Android Studio main window.
1. The toolbar used to carry out a wide range of actions, including running an app
and launching Android tools.
2. The navigation bar helps to navigate through the project and open files for
editing. It provides a more compact view of the structure visible in the Project
window.
3. The editor window is where developer can create and modify code. Depending
on the current file type, the editor can change. For example, when viewing a
layout file, the editor displays the Layout Editor.
4. The tool window bar runs around the outside of the IDE window and contains
the buttons that allows the developer to expand or collapse individual tool
windows.
5. The tool windows give the access to specific tasks like project management,
search, version control, and more. Developer can expand them and collapse
them.
6. The status bar displays the status of the project and the IDE itself, as well as
any warnings or messages.
2. Gradle Build System:
• Android Studio uses the Gradle build system to automate the process of
building, testing, and packaging Android apps.
• The build.gradle files in your project define build configurations,
dependencies, and other settings.
3. Android Virtual Device (AVD) Manager:
• AVD Manager allows you to create and manage virtual devices for testing your
app on different Android device configurations.
• You can simulate various screen sizes, resolutions, and Android versions using
virtual devices.
4. Layout Editor:
• Android Studio includes a visual layout editor for designing your app's user
interface.
• You can drag and drop UI components, preview different screen sizes, and
switch between design and code views.
5. Code Analysis and Debugging:
• Android Studio provides tools for code analysis, lint checks, and debugging.
• The debugger allows you to set breakpoints, inspect variables, and step through
your code.
6. Device File Explorer:
• Allows you to view and manipulate the files on an emulator or connected
device.
7. Version Control Integration:
• Android Studio integrates with version control systems like Git, making it easy
to manage and track changes to your code.
8. Instant Run:
• Instant Run allows you to quickly see the impact of code changes without
redeploying the entire app.
9. Kotlin Support:
• Android Studio has excellent support for the Kotlin programming language,
making it a preferred language for Android development.
10. Integration with Android SDK:
• Android Studio comes bundled with the Android SDK, which includes
essential libraries, APIs, and tools needed for Android development.
11. Extensibility:
• Android Studio supports the installation of plugins, allowing developers to
extend its functionality.
12. Updates and Community Support:
• Android Studio receives regular updates with new features and improvements.
• It has a strong community and is widely used by Android developers globally.
Procedure:
System Requirements: Ensure that your system meets the minimum requirements for
Android Studio. Visit the requirements on the official Android Studio website.
Step 1: Download Android Studio
1. Go to the official Android Studio download page: Android Studio Download.
2. Click on the "Download" button.
Step 2: Run the Installer
1. Once the download is complete, locate the downloaded installer file (usually
android-studio-2023.1.1.26-windows).
2. Double-click on the installer to run it.
Step 3: Install Android Studio
1. The Android Studio Setup Wizard will open. Click "Next" to proceed.
2. Read and accept the terms and conditions, then click "Next."
3. Choose the components you want to install. Make sure "Android Studio" and
"Android Virtual Device" are selected. Click "Next."
4. Choose the installation location or leave the default. Click "Next."
5. Choose the Start Menu folder where shortcuts will be created. Click "Install."
6. The installation process will start. This may take some time, so be patient.
7. Once the installation is complete, click "Next" and then "Finish."
Step 4: Configure Android Studio
1. On the first launch of Android Studio, you'll be prompted to import settings. If
it's your first time, select the option to set up Android Studio for the first time.
2. Choose a UI theme and click "Next."
3. Android Studio will download the necessary SDK components. This process
may take some time.
4. Once the SDK components are downloaded, you'll be prompted to verify the
SDK location. Click "Next."
5. Optionally, you can choose to send usage statistics to Google, and then click
"Finish."
Step 5: Start Android Studio
1. On the Android Studio welcome screen, click "Start a new Android Studio
project" or open an existing project.
2. If prompted, update any plugins and SDK components.
3. Android Studio is now ready for development.
Creating a custom Android Virtual Device (AVD) with a different screen size
Step 1: Open AVD Manager
1. Open Android Studio.
2. Click on "Configure" in the Welcome screen or navigate to "File" > "Settings" (or
"Preferences" on macOS) > "Appearance & Behavior" > "System Settings" >
"Android SDK."
3. In the SDK Platforms tab, click on "Launch Standalone SDK Manager" at the
bottom.
4. In the standalone SDK Manager, click on "SDK Tools," and ensure that "Android
Emulator" is checked. Click "Apply" and then "OK."
Step 2: Create a New AVD
1. In Android Studio, click on "Configure" and then "AVD Manager."
2. In the AVD Manager, click on "Create Virtual Device."
3. Choose a hardware profile that matches the general characteristics of the device
you want to emulate
. For example, select "Pixel 4" or "Nexus 5X."
4. Click "Next."
Step 3: Configure the AVD
1. In the System Image tab, select a system image with the desired Android version
and ABI. Click "Next."
2. Configure the AVD settings:
• Name: Enter a name for your AVD.
• Device: Choose a device with a different screen size. You can customize
the resolution by selecting "No Skin" in the Skin dropdown and then
entering the desired screen dimensions under "Resolution."
• Orientation: Choose the desired orientation (portrait or landscape).
• Scale: Optionally, you can set a custom scale to resize the emulator
window.
3. Click "Finish" to create the custom AVD.
4.
Step 4: Start the Emulator
1. In the AVD Manager, select your newly created AVD.
2. Click on the green "Play" button to start the emulator.
3. Wait for the emulator to boot up. This may take some time.
Step 5: Test Your App
1. Once the emulator is running, you can test your Android app on the virtual device
with the custom screen size.
2. Deploy and run your app from Android Studio, and it will be installed on the
emulated device.
Result:
Successfully Set up Android Studio in Windows, create a custom Android Virtual Device
with a different screen size, and emulate the device using the AVD Manager in Android
Studio.