[Link](I.
T) SEM-VI Maharashtra College Advanced Mobile Programming
Practical 1
Building a simple Hello World Application
Steps to Install Android Studio
Step – 1:
Head over to bellow link to get the Android Studio executable or zip file .
[Link]
Step – 2:
Click on the download android studio button .
Click on the “I have read and agree with the above terms and conditions” checkbox followed by the
download button.
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 1
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
Click on save file button in the appeared prompt box and the file will start downloading.
Step – 3:
After the downloading has finished, open the file from downloads and run it .
It will prompt the following dialogue box
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 2
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
Click on next.
In the next prompt it’ll ask for a path for installation. Choose a path and hit next.
Step – 4:
It will start the installation, and once it is completed, it will be like the image shown below
Click on next
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 3
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
Step – 5 :
Once “Finish” is clicked, it will ask whether the previous settings needs to be imported [if android
studio had been installed earlier], or not.
It is better to choose the ‘Don’t import Settings option’ .
Step – 6 :
This will start the Android Studio.
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 4
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
Meanwhile it will be finding the available SDK components .
Step – 7:
After it has found the SDK components, it will redirect to the Welcome dialog box .
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 5
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
Click on next .
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 6
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
Choose Standard and click on Next.
Now choose the theme, whether Light theme or the Dark one .
The light one is called the IntelliJ theme whereas the dark theme is called Darcula .
Choose as required.
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 7
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
Click on the Next button
Step – 8 :
Now it is time to download the SDK components .
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 8
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
Click on Finish .
It has started downloading the components
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 9
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
The Android Studio has been successfully configured.
Now it’s time to launch and build apps.
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 10
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
Steps to create a project in android
To create your new Android project, follow these steps:
Install the latest version of Android Studio.
In the Welcome to Android Studio window, click Start a new Android Studio project.
If you have a project already opened, select File > New > New Project.
In the Choose your project window, select Empty Activity and click Next.
In the Configure your project window, complete the following:
1. Enter "My First App" in the Name field.
2. Enter "[Link]" in the Package name field.
3. If you'd like to place the project in a different folder, change its Save location.
4. Select either Java or Kotlin from the Language drop-down menu.
Select the checkbox next to Use androidx.* artifacts.
Leave the other options as they are.
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 11
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
Click Finish.
After some processing time, the Android Studio main window appears.
Note
To Open Project Window
select View > Tool Windows > Project
To Open [Link] file
app > java > PackageName > [Link]
To Open Layout activity_main.xml file
app > res > layout > activity_main.xml
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 12
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
1. After the project is created, there are 2 files, [Link] and
activity_main.xml
2. Go to activity_main.xml and select Design View
3. In Design View, change the layout to LinearLayout(Vertical) select
Add TextView, and change the text to “Hello World!”
4. Click on Run and select the AVD already created(if not created, first
create the AVD)
5. Output screen should show “Hello World”
To create a new AVD:
1. Open the AVD Manager by clicking Tools > AVD Manager.
2. Click Create Virtual Device, at the bottom of the AVD Manager dialog. ...
3. Select a hardware profile, and then click Next.
4. Select the system image for a particular API level, and then click Next.
5. Change AVD properties as needed, and then click Finish.
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 13
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 14
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
Output
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 15
[Link](I.T) SEM-VI Maharashtra College Advanced Mobile Programming
Prof. Ansari Mohd. Shahid(7977-079-345 / 9821-77-1054) Page 16