MCQs / Computer Science / Lab: Android Studio Setup and First App

Lab: Android Studio Setup and First App MCQs — Computer Science

20 multiple-choice questions on Lab: Android Studio Setup and First App from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.

1. The Android Emulator runs fast only when which CPU feature is enabled?

  1. Hyper-threading
  2. Hardware virtualisation (VT-x / AMD-V)
  3. Integrated graphics
  4. Turbo boost

Answer: B) Hardware virtualisation (VT-x / AMD-V)

Explanation: The emulator uses hardware acceleration based on CPU virtualisation.

Discuss this question

2. Launcher icons are stored in which resource folder?

  1. values
  2. mipmap
  3. layout
  4. raw

Answer: B) mipmap

Explanation: mipmap folders hold launcher icons in different densities.

Discuss this question

3. In which file are minSdk, targetSdk and versionCode set?

  1. strings.xml
  2. settings.gradle only
  3. The module-level build.gradle(.kts) file
  4. AndroidManifest.xml only

Answer: C) The module-level build.gradle(.kts) file

Explanation: The app module's Gradle build file contains the defaultConfig with SDK versions and version info.

Discuss this question

4. Which file declares an app's activities and permissions?

  1. MainActivity.kt
  2. build.gradle.kts
  3. strings.xml
  4. AndroidManifest.xml

Answer: D) AndroidManifest.xml

Explanation: The manifest declares components, permissions and app properties.

Discuss this question

5. Which method is used to get a reference to a view defined in XML?

  1. getLayout()
  2. setContentView()
  3. getView()
  4. findViewById()

Answer: D) findViewById()

Explanation: findViewById(R.id.viewId) returns the view object with that id.

Discuss this question

6. The R class in Android is used to:

  1. Access resource IDs such as R.layout.activitymain and R.id.tvHello
  2. Run the app
  3. Store user passwords
  4. Start the emulator

Answer: A) Access resource IDs such as R.layout.activitymain and R.id.tvHello

Explanation: R is generated automatically and holds integer IDs for all resources.

Discuss this question

7. Which SDK component contains the adb tool?

  1. Platform-Tools
  2. System image
  3. Build-Tools
  4. Emulator

Answer: A) Platform-Tools

Explanation: adb (Android Debug Bridge) is part of the SDK Platform-Tools package.

Discuss this question

8. The method that connects an XML layout file to an activity is:

  1. findViewById()
  2. setContentView()
  3. inflateMenu()
  4. startActivity()

Answer: B) setContentView()

Explanation: setContentView(R.layout.activitymain) inflates the layout as the activity's UI.

Discuss this question

9. Which keyboard shortcut runs the app in Android Studio (Windows)?

  1. Ctrl + R
  2. Alt + F4
  3. Shift + F10
  4. Ctrl + S

Answer: C) Shift + F10

Explanation: Shift + F10 runs the selected configuration on Windows/Linux.

Discuss this question

10. To enable Developer options on most Android phones you:

  1. Restart the phone 7 times
  2. Tap "Build number" 7 times in About phone
  3. Enable flight mode
  4. Install Android Studio on the phone

Answer: B) Tap "Build number" 7 times in About phone

Explanation: Tapping Build number seven times unlocks Developer options.

Discuss this question

11. UI text such as "Hello World" should be stored in:

  1. themes.xml
  2. AndroidManifest.xml
  3. strings.xml
  4. colors.xml

Answer: C) strings.xml

Explanation: Strings belong in res/values/strings.xml for easy translation and maintenance.

Discuss this question

12. Minimum SDK API 24 means the app can be installed on:

  1. All versions of Android
  2. Android 7.0 (API 24) and newer
  3. Only Android 24
  4. Android 2.4 only

Answer: B) Android 7.0 (API 24) and newer

Explanation: minSdk is the lowest Android version (API level) the app supports.

Discuss this question

13. An Android Virtual Device (AVD) is:

  1. A configuration of an emulated Android phone or tablet
  2. A Gradle plugin
  3. A library for virtual reality
  4. A real phone connected through USB

Answer: A) A configuration of an emulated Android phone or tablet

Explanation: An AVD defines the hardware profile and system image used by the emulator.

Discuss this question

14. The res/drawable folder is mainly used for:

  1. Kotlin source files
  2. Database files
  3. Images and vector graphics
  4. Gradle scripts

Answer: C) Images and vector graphics

Explanation: Drawables are images, shapes and vector graphics used by the UI.

Discuss this question

15. In Android Studio, the tool used to download new Android platforms and system images is the:

  1. SDK Manager
  2. Logcat
  3. Device Manager
  4. Layout Inspector

Answer: A) SDK Manager

Explanation: The SDK Manager installs SDK platforms, tools and system images.

Discuss this question

16. Android Studio is based on which IDE?

  1. Visual Studio
  2. Eclipse
  3. NetBeans
  4. IntelliJ IDEA

Answer: D) IntelliJ IDEA

Explanation: Android Studio is built on JetBrains' IntelliJ IDEA platform.

Discuss this question

17. To show a short pop-up message at the bottom of the screen we use a:

  1. Dialog
  2. Snackbar only
  3. Notification
  4. Toast

Answer: D) Toast

Explanation: Toast.makeText(context, text, duration).show() displays a short message.

Discuss this question

18. Which project template creates an XML-based (View system) activity?

  1. Empty Activity
  2. Basic Compose Activity
  3. No Activity
  4. Empty Views Activity

Answer: D) Empty Views Activity

Explanation: "Empty Views Activity" uses XML layouts; "Empty Activity" uses Jetpack Compose.

Discuss this question

19. Which intent-filter makes an activity appear in the app launcher?

  1. Action CALL with category HOME
  2. Action SEND with category DEFAULT
  3. Action VIEW with category BROWSABLE
  4. Action MAIN with category LAUNCHER

Answer: D) Action MAIN with category LAUNCHER

Explanation: MAIN + LAUNCHER marks the entry-point activity shown in the launcher.

Discuss this question

20. The Logcat window in Android Studio shows:

  1. The APK size
  2. The XML design preview
  3. The list of Gradle dependencies
  4. System and app log messages from the device

Answer: D) System and app log messages from the device

Explanation: Logcat displays log output such as Log.d messages and crash stack traces.

Discuss this question

Practise Lab: Android Studio Setup and First App MCQs

More Computer Science chapters