Note: I'm completely new to development in Android Studio.
I downloaded and installed the latest Android Studio (Flamingo 2022.2.1). Then I was trying to follow some beginners tutorials and created a new project (I selected Empty Activity
).
The project opens and I can see the generated MainActivity.kt
file. Similar to the tutorials.
Everything seems to be in order except that in my res
folder there is no layout
folder and consequently there is no activity_main.xml
file.
Is this the expected behaviour for this version of Android Studio or am I doing something wrong?
EDIT: added screen capture for New Project option
Android 2022.2 switched from the classical views concept to Jetpack Compose, which does not require a layout defined in XML anymore. Everything is done in the Kotlin code instead. See the official Jetpack Compose introduction for more info.
However, this only means that Jetpack Compose is used in some templates for new projects. You are still able to develop apps the classical way. Just choose the Empty Views Activity template when you start a new project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With