Professional Documents
Culture Documents
Experiment 1
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.
button.
Step 12: Android Studio is successfully installed. Now you can create your project and start
working on it
Hello World Program:-
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
@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.