skip to Main Content

I’ve been following this(https://youtu.be/4M0hNugPJV8) YouTube tutorial on how to create projects in AndroidStudio and they go to res/layout folder to work with the activity_main.xml file

When creating a project i’ve chosen an Empty Activity, but can’t see anything like activity_main.xml file here.
Is it possible to add it somehow? Can’t figure out how do i work with it in the latest version of the AndroidStudio.
Thank You

Here is the photo

2

Answers


  1. Hopefully you’ve already resolved your issue but I encountered the same problem and found what I believe is the intended solution to this.
    The tutorial said to create an "Empty Activity" project which creates the basic "Hello World" using Composable functions. Not too sure what those are yet, but I looked and found that you can create an "Empty Views Activity" instead and that creates the same project but includes the layout that the tutorial references.

    Login or Signup to reply.
    1. Right-Click res folder
    2. Go to New
    3. Select Android Resource File
    4. Type a file name. (e.g. layout_dummy)
    5. Click Resource Type to get a drop-down menu.
    6. Select layout and click ok.

    You will be able to see layout directory again.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search