Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
The Fundamentals  ›  Lesson

Android Studio and the Project Tree

Development IDE 12 minAndroid Studio is the official IDE for Android, and every app project keeps code, resources and the manifest in fixed, predictable places.

Android Studio and the Project Tree

You open Sprout for the first time and see dozens of folders. Knowing where things live is half of Android development. The good news: every Android project uses the same layout, so you learn it once.

The rule

Code in java, looks in res, the contract in the manifest.

Android Studio is the official IDE, built on IntelliJ IDEA. Besides the editor it gives you the SDK Manager (Android platform versions), the Device Manager (emulators), Logcat (the live log from a running app) and a debugger.

Inside the app module, three places matter most:

app/src/main/
├── java/com/example/sprout/   ← Kotlin and Java code
├── res/                       ← resources: strings, images, colors, themes
└── AndroidManifest.xml        ← what the app contains and needs
  • java/ holds your source files, even Kotlin ones, in folders matching the package name.
  • res/ holds everything that is not code: values/strings.xml for text, drawable/ for images, mipmap/ for the launcher icon.
  • AndroidManifest.xml tells the system what the app is: its activities, the permissions it asks for, its icon and name.

Resources get an ID the code can use, such as R.string.app_name, so text can be translated without touching code.

The shortcut

Ask "is it logic, looks, or a declaration to the system?"

Placing three changes in SproutStep 1 of 4
  1. Add a watering timer class

    It is logic → a .kt file under java/com/example/sprout/.

A common mistake is hard-coding user-facing text in code. It works, but it cannot be translated. Put it in strings.xml.

Drills

Answer fast — trust the rule.

quick drill

Where does Sprout's Kotlin source code live?

quick drill

Which file declares the activities an app contains?

quick drill

Where should the text "Water me!" shown on a button go?

quick drill

Which Android Studio tool shows messages printed by your running app?

Remember

  • Code in java, looks in res, the contract in the manifest.
  • Sort any change by asking: logic, looks, or declaration?
  • Keep user-facing text in strings.xml, never hard-coded.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainWhere does it live?

In Sprout's project you need to (1) change the app's name shown under its icon, (2) add a new screen class, and (3) check which screens the system knows about. Say which file or folder you open for each, and why Android keeps them apart.