What is the purpose of the app folder in an Android project?
The app folder contains all the source code, resources, and configuration files for the Android application module. It is where you write your Kotlin code, define layouts, and manage app-specific files.
Click to reveal answer
beginner
What is the role of build.gradle files in an Android project?
The build.gradle files define how the project is built. The project-level build.gradle manages global settings and dependencies, while the app-level build.gradle configures the app module, including dependencies, SDK versions, and build types.
Click to reveal answer
beginner
What is the AndroidManifest.xml file used for?
The AndroidManifest.xml file declares essential information about the app to the Android system, such as app components (activities, services), permissions, app name, icon, and minimum SDK version.
Click to reveal answer
beginner
Where do you define app permissions like internet access in an Android project?
App permissions are declared inside the AndroidManifest.xml file using <uses-permission> tags. For example, to use the internet, you add <uses-permission android:name="android.permission.INTERNET" />.
Click to reveal answer
intermediate
What is the difference between project-level and app-level build.gradle files?
The project-level build.gradle manages settings and dependencies that apply to the whole project, like repositories and plugin versions. The app-level build.gradle configures the app module specifically, including SDK versions, dependencies, and build types.
Click to reveal answer
Which folder contains the Kotlin source code in an Android project?
Aapp/src/main/java
Bgradle/wrapper
Capp/build
Dmanifests
✗ Incorrect
The Kotlin source code is stored in the app/src/main/java folder inside the app module.
Where do you specify the minimum SDK version your app supports?
Asettings.gradle
BAndroidManifest.xml
Cproject-level build.gradle
Dapp-level build.gradle
✗ Incorrect
The minimum SDK version is specified in the app-level build.gradle file under the defaultConfig block.
What is NOT a purpose of the AndroidManifest.xml file?
ADeclare app components like activities
BDefine app permissions
CWrite Kotlin code
DSet app icon and label
✗ Incorrect
Kotlin code is written in source files, not in the AndroidManifest.xml.
Which file manages global project dependencies and plugin versions?
Aproject-level build.gradle
Bapp-level build.gradle
CAndroidManifest.xml
Dsettings.gradle
✗ Incorrect
The project-level build.gradle manages global dependencies and plugin versions.
Where do you add external libraries your app needs?
AAndroidManifest.xml
Bapp-level build.gradle dependencies block
Cproject-level build.gradle
Dgradle.properties
✗ Incorrect
External libraries are added in the dependencies block of the app-level build.gradle file.
Explain the main roles of the app folder, build.gradle files, and AndroidManifest.xml in an Android project.
Think about where code lives, how the build is configured, and how the app tells Android about itself.
You got /4 concepts.
Describe how you would add a new permission and an external library to your Android app project.
Permissions go in the manifest; libraries go in the build.gradle.
You got /2 concepts.
Practice
(1/5)
1. What is the main purpose of the app folder in an Android project?
easy
A. It stores the build configuration files.
B. It contains the app's source code and resources.
C. It holds the Android system files.
D. It contains the device emulator settings.
Solution
Step 1: Understand the app folder role
The app folder is where you put your app's code and resources like images and layouts.
Step 2: Differentiate from other folders
Build files like build.gradle are outside or inside app but serve different purposes; system files are not in app.
Final Answer:
It contains the app's source code and resources. -> Option B
Quick Check:
App folder = source code and resources [OK]
Hint: App folder = your app's code and resources [OK]
Common Mistakes:
Confusing build files with app folder contents
Thinking system files are inside app folder
Mixing emulator settings with project structure
2. Which file in an Android project declares the app's components and permissions?
easy
A. build.gradle
B. proguard-rules.pro
C. settings.gradle
D. AndroidManifest.xml
Solution
Step 1: Identify the manifest file role
The AndroidManifest.xml file describes app components like activities and permissions.
Step 2: Compare with other files
build.gradle handles build settings, settings.gradle manages modules, and proguard-rules.pro is for code shrinking rules.
Final Answer:
AndroidManifest.xml -> Option D
Quick Check:
Manifest = app components and permissions [OK]
Hint: Manifest file = app components and permissions [OK]
Common Mistakes:
Confusing build.gradle with manifest
Thinking settings.gradle declares permissions
Mixing ProGuard rules with app declarations
3. Given this snippet from build.gradle inside the app folder, what will happen if you add a new dependency incorrectly?