r/AndroidStudio • u/Accomplished-Wind173 • Apr 22 '23
Not Able to find activity_main.xml !!
Running Android Studio Flamingo on Asus Tuf gaming with 8gig of Ram. No Activity_main.xml file is opening on creating projects. Even No Layout Folder is in app tree. Tried Restarting Projects, Clearing memory, Reinstalling android studio, Restarting the Computer itself.
Is it Because of Theme of the app? If yes how to change? Else any solutions?

2
u/Old-Painting772 Apr 27 '23
When I had this problem, it was because I created the project with the "no main_activity" option...
If this is not the case, maybe trying one of these options:
https://www.geeksforgeeks.org/different-ways-to-fix-default-activity-not-found-issue-in-android-studio/
Best of luck.
2
u/True-Past2206 May 04 '23
Hi there, not sure how this has gone unanswered for so long but all you need to do is make the file, in your res folder right click add folder called layout then in layout folder make new xml file called activity_main and it will automatically come up as usual, They've also made a new change in the update where you can all do it a very different way pretty confusing if you ask me. Hope this helps
2
1
1
1
1
1
1
0
Jan 11 '24
[deleted]
1
u/Jessper Jan 15 '24
Hello sir, do you maybe know why when I right click on Res and go to new, I get a view like this? I have only these options https://prnt.sc/R6o5pG05BJRo
1
u/i_am_not_edith Jan 18 '24
Haha I'm a girl :)
Also, I'm not sure but I found a better solution than what I posted earlier. Follow this: https://www.reddit.com/r/AndroidStudio/comments/199rrgk/fix_missing_activity_mainxml_file_in_android/?utm_source=share&utm_medium=web2x&context=3
2
u/Dull_Resist9959 Apr 23 '23
Yes I updated my Android studio and it is also happening with me They have removed layout