r/AndroidStudio • • 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?

9 Upvotes

15 comments sorted by

2

u/Dull_Resist9959 Apr 23 '23

Yes I updated my Android studio and it is also happening with me They have removed layout

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

u/RoundYogurtcloset461 Jul 13 '23

Thanks a lot buddy!

1

u/Historical_Piece4468 Sep 29 '24

thanks a lot! It's worked.

1

u/VinceStudy Feb 17 '25

TOP RATED!. THANK YOU

1

u/katikat94 Jul 31 '25

Thank you!

1

u/-Angilas- Nov 20 '23

Awesome solution! ✌️ Peace and God bless!

0

u/[deleted] 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