MCQs / Computer Science / Lab: Generating and Installing an APK

Lab: Generating and Installing an APK MCQs — Computer Science

14 multiple-choice questions on Lab: Generating and Installing an APK 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. Which Android Studio tool shows the size and contents of an APK?

  1. Device Manager
  2. Logcat
  3. APK Analyzer (Build → Analyze APK)
  4. Layout Inspector

Answer: C) APK Analyzer (Build → Analyze APK)

Explanation: APK Analyzer breaks down dex files, resources and size.

Discuss this question

2. INSTALLFAILEDUPDATEINCOMPATIBLE usually means:

  1. The phone is full
  2. The APK has no icon
  3. The emulator is off
  4. The installed app has the same package name but a different signing key

Answer: D) The installed app has the same package name but a different signing key

Explanation: Uninstall the old version signed with a different key first.

Discuss this question

3. Why must the keystore and passwords be backed up safely?

  1. It contains the source code
  2. Updates must be signed with the same key; losing it can prevent updating the app
  3. It makes the app run faster
  4. It is required to open Android Studio

Answer: B) Updates must be signed with the same key; losing it can prevent updating the app

Explanation: The signing identity must stay the same across updates (unless Play upload-key reset is used).

Discuss this question

4. To install an APK received on WhatsApp, the user must allow:

  1. Developer options only
  2. Location access
  3. "Install unknown apps" for that source
  4. Airplane mode

Answer: C) "Install unknown apps" for that source

Explanation: Android blocks installs from unknown sources until allowed.

Discuss this question

5. Which menu builds a debug APK in Android Studio?

  1. Tools → SDK Manager
  2. Run → Debug only
  3. Build → Build App Bundle(s) / APK(s) → Build APK(s)
  4. File → Export → APK

Answer: C) Build → Build App Bundle(s) / APK(s) → Build APK(s)

Explanation: Build APK(s) creates app-debug.apk.

Discuss this question

6. Where should the keystore NOT be stored?

  1. On an encrypted backup
  2. In a password manager
  3. On a private USB drive
  4. In a public GitHub repository

Answer: D) In a public GitHub repository

Explanation: Uploading the keystore exposes your signing key.

Discuss this question

7. The debug APK is signed with:

  1. No key at all
  2. Your release keystore
  3. An automatically generated debug key
  4. Google's app signing key

Answer: C) An automatically generated debug key

Explanation: Android Studio signs debug builds with ~/.android/debug.keystore.

Discuss this question

8. Where is the debug APK saved?

  1. app/build/outputs/apk/debug/app-debug.apk
  2. app/src/main
  3. res/raw
  4. gradle/wrapper

Answer: A) app/build/outputs/apk/debug/app-debug.apk

Explanation: Gradle writes outputs under app/build/outputs.

Discuss this question

9. Which command lists devices connected to adb?

  1. adb connect-all
  2. adb devices
  3. adb list
  4. adb show

Answer: B) adb devices

Explanation: adb devices lists emulators and phones.

Discuss this question

10. The simplest way to install an APK on a running emulator is to:

  1. Restart Android Studio
  2. Drag and drop the APK file onto the emulator window
  3. Rename it to .zip
  4. Email it

Answer: B) Drag and drop the APK file onto the emulator window

Explanation: The emulator installs dropped APKs automatically.

Discuss this question

11. Which command installs or updates an APK while keeping app data?

  1. adb install -r app.apk
  2. adb push app.apk
  3. adb install -d
  4. adb uninstall app.apk

Answer: A) adb install -r app.apk

Explanation: -r reinstalls an existing app.

Discuss this question

12. Can an AAB file be installed directly on a phone by tapping it?

  1. Only on Android 4
  2. Yes, always
  3. Only on emulators
  4. No – it is a publishing format; Play (or bundletool) generates APKs from it

Answer: D) No – it is a publishing format; Play (or bundletool) generates APKs from it

Explanation: AABs are not directly installable.

Discuss this question

13. Which Gradle command builds a debug APK from the terminal?

  1. gradlew installRelease
  2. gradlew clean only
  3. gradlew assembleDebug
  4. gradlew run

Answer: C) gradlew assembleDebug

Explanation: assembleDebug builds the debug variant.

Discuss this question

14. A keystore file for signing usually has the extension:

  1. .aab
  2. .apk
  3. .dex
  4. .jks

Answer: D) .jks

Explanation: Java KeyStore files use .jks (or .keystore).

Discuss this question

Practise Lab: Generating and Installing an APK MCQs

More Computer Science chapters