You are on page 1of 13

Pillai College Of Engineering

Name: Soham lende Class: TEIT-A


Roll No: ITA626 DOP:14/01/23

Sign: DOS: /01/23


Grade: Subject:MAD

Experiment 1

Introduction to Android Studio

Installation Output:-

Step 1: To download the Android Studio, visit the official Android Studio website in your web
browser. Click on the "Download Android Studio" option.
Step 2: Double click on the downloaded "Android Studio-ide.exe" file.

Step 3: Select the components that you want to install and click on the "Next" button
Step 4: Select the location where the android studio needs to be installed.

Step 5: Choose a start menu folder for the "Android Studio" shortcut and click the
"Install" button to proceed.

Step 6:Install the android studio.After the successful completion of the installation, click on the
"Next" button.

Step 7: Click on the "Finish" button to proceed.


Step 8: Select (check) the "Standard" option if you are a beginner and do not have any idea about
Android Studio. It will install the most common settings and options for you. Click "Next" to
proceed.

Step 9: To verify settings click an option then proceed to next.


Step 10: Accept the license agreement then select finish.

Step 11: The downloading and installation process of components gets


started.After downloading all the necessary components, click on the "Finish"

button.
Step 12: Android Studio is successfully installed. Now you can create your project and start
working on it
Hello World Program:-

Step 1: Create a new project with an empty composer activity.

Step 2: Name your project and click finish.


Code:

package com.example.greetingcard

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.example.greetingcard.ui.theme.GreetingCardTheme

class MainActivity : ComponentActivity() {


override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
GreetingCardTheme {
// A surface container using the 'background' color from the theme
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colors.background) {
Greeting("Android")
}
}
}
}
}

@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}

@Preview(showBackground = true)
@Composable
fun DefaultPreview() {
GreetingCardTheme {
Greeting("Android")
}
}
Output:

Conclusion: Thus, android studio has been installed and the hello world program has been executed
successfully.

You might also like