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? Hyper-threading Hardware virtualisation (VT-x / AMD-V) Integrated graphics 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? values mipmap layout 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? strings.xml settings.gradle only The module-level build.gradle(.kts) file 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? MainActivity.kt build.gradle.kts strings.xml 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? getLayout() setContentView() getView() 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: Access resource IDs such as R.layout.activitymain and R.id.tvHello Run the app Store user passwords 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? Platform-Tools System image Build-Tools 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: findViewById() setContentView() inflateMenu() 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)? Ctrl + R Alt + F4 Shift + F10 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: Restart the phone 7 times Tap "Build number" 7 times in About phone Enable flight mode 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: themes.xml AndroidManifest.xml strings.xml 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: All versions of Android Android 7.0 (API 24) and newer Only Android 24 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: A configuration of an emulated Android phone or tablet A Gradle plugin A library for virtual reality 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: Kotlin source files Database files Images and vector graphics 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: SDK Manager Logcat Device Manager 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? Visual Studio Eclipse NetBeans 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: Dialog Snackbar only Notification 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? Empty Activity Basic Compose Activity No Activity 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? Action CALL with category HOME Action SEND with category DEFAULT Action VIEW with category BROWSABLE 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: The APK size The XML design preview The list of Gradle dependencies 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