1(a) ANDROID STUDIO INSTALLATION
Android Studio is the official IDE for android application development. It works based on IntelliJ IDEA.
So let's launch Android [Link], Make sure before launch Android Studio, Our Machine should
require installed Java JDK.
WINDOWS
• 64-bit Microsoft Windows8/10
• x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for
a Windows Hypervisor
• 8 GB RAM or more
• 8 GB of available disk space minimum (IDE + Android SDK + Android Emulator)
• 1280 x 800 minimum screen resolution
LINUX
• Any 64-bit Linux distribution
• x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with
support for AMD Virtualization (AMD-V) and SSSE3
• 8 GB RAM or more
• 8 GB of available disk space minimum (IDE + Android SDK + Android Emulator)
• 1280 x 800 minimum screen resolution
Step 1: Download Android Studio
Visit the official Android website:
👉 [Link]
Click "On The link given in image".
Select "the latest version of an Android studio ".
Accept the licence and Download the .exe File
Step 2: Run the Installer
• Locate the downloaded .exe file (e.g., [Link]) in your
Downloads folder.
• Double-click to run the installer.
Click "On the Next ".
Click "On the Next ".
Click "On the Next ".
Click "On the Next ".
Click "On the Install ".
Click "On the Next ".
After installation Click "On the Finish ".
Step 3: Android Studio Setup Wizard
• Choose components: Android Studio, Android SDK, Emulator, etc.
Step 4: Create a New Project
• Open Android Studio.
• Click "New Project" → Choose a template (like "Empty Views Activity").
• Set name, package name, and save location.
• Choose language Java.
• Click Finish.
Step 5: Run App on Emulator (Optional)
• Go to Tools → Device Manager.
• Create a new virtual device (select phone model).
Click “On Finish”
Start Emulator and click Run App.
1(b) Create an android application that prints the “Hello World” message
<?xml version="1.0" encoding="utf-8"?>
<[Link]
xmlns:android="[Link]
xmlns:app="[Link]
xmlns:tools="[Link]
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.359" />
</[Link]>
1(c) Android life cycle
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
[Link](this);
setContentView([Link].activity_main);
Log.d("lifecycle", "onCreate invoked");
}
protected void onStart()
{
[Link]();
Log.d("lifecycle","onStart invoked");
}
protected void onResume() {
[Link]();
Log.d("lifecycle","onResume invoked");
}
protected void onPause() {
[Link]();
Log.d("lifecycle","onPause invoked");
}
protected void onStop() {
[Link]();
Log.d("lifecycle","onStop invoked");
}
protected void onRestart() {
[Link]();
Log.d("lifecycle", "onRestart invoked");
}
protected void onDestroy() {
[Link]();
Log.d("lifecycle","onDestroy invoked");
}
}