AIM: Configuring Android Development Environment.
Android application development requires a specific set of tools bundled together. The
core component is Android Studio, the official IDE endorsed by Google. It is built on
JetBrains' IntelliJ IDEA software and is specifically designed for Android development.
Inside Android Studio, the Android SDK Manager is used to install different versions of
the Android platform (API levels) and essential tools like the Android SDK Build-Tools.
Tools and Technologies Used
• Android Studio: Stable or Canary build (for preview features)
• Android SDK: Platform SDK and Build-Tools
• Java Development Kit (JDK) 11 or 17: (Bundled with Android Studio, but
separate installation may be required in some cases)
Procedure: Step-by-Step Installation Guide
Step 1: Install Android Studio
1. Navigate to the official Android Developer website
(developer.android.com/studio).
2. Download the latest recommended Stable build for general use or the
Canary build to access cutting-edge features (may be less stable).
3. Run the downloaded installer and follow the on-screen setup wizard.
This will typically install the IDE and a default version of the Android
SDK.
Step 2: Launch the SDK Manager
1. Open Android Studio.
2. From the top menu bar, navigate to Tools > SDK Manager.
Step 3: Install the Android Platform (SDK Platform)
1. In the SDK Manager window, select the "SDK Platforms" tab.
, 2. Locate and select the checkbox for "Android Upside Down Cake
Privacy Sandbox Preview". This is a preview version of a future Android
release.
3. (Optional) Select any other Android versions you wish to develop for
(e.g., Android 13 (Tiramisu)).
Step 4: Install the SDK Build-Tools
1. Click on the "SDK Tools" tab.
2. Ensure the checkbox for "Android SDK Build-Tools 33" (or a later
version) is selected. This package includes essential utilities for
building your app's source code into an APK.
Step 5: Complete the Installation
1. Click "OK" to apply the changes.
2. A confirmation dialog will show the packages to be downloaded. Click
"OK" to proceed.
3. Android Studio will now download and install the selected SDK
packages. Accept any necessary licenses during the process.
,Verification of Successful Configuration
To verify that the environment has been configured correctly:
1. Start a new project in Android Studio (File > New > New Project...).
2. Choose a basic template (e.g., "Empty Activity").
3. Click "Finish". If the project is created successfully without any errors
related to missing SDKs or build tools, the environment has been
configured correctly.
4. You can further verify by building the project (Build > Make Project).
, PRACTICAL: 2
AIM: Develop an android application that uses GUI components, Font
and Colors.
Code:
package com.example.myapplication; import android.graphics.Typeface; import
android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter; import android.widget.Button; import
android.widget.CheckBox; import android.widget.RadioButton; import
android.widget.RadioGroup; import android.widget.ScrollView; import android.widget.Spinner;
import android.widget.TextView; import android.widget.ToggleButton;
import androidx.appcompat.app.AppCompatActivity; import
androidx.appcompat.widget.SwitchCompat; import androidx.core.widget.NestedScrollView;
import com.google.android.material.floatingactionbutton.FloatingActionButton; import
com.google.android.material.snackbar.Snackbar;
import com.google.android.material.textfield.TextInputEditText; public class MainActivity
extends AppCompatActivity {
private Button normalButton, coloredButton, outlinedButton, submitButton, bottomButton;
private ToggleButton toggleButton;
private FloatingActionButton fab; private CheckBox checkbox; private RadioGroup radioGroup;
private SwitchCompat switchWidget; private Spinner spinner;
private TextInputEditText nameInput, emailInput; private ScrollView scrollView;
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); initializeViews();
setupSpinner(); setupClickListeners();
}
@Override
protected void onResume() { super.onResume();
if (scrollView != null) { scrollView.setEnabled(true); scrollView.setVisibility(View.VISIBLE);
scrollView.setVerticalScrollBarEnabled(true); scrollView.setScrollbarFadingEnabled(false);