Locate MainActivity Java or Kotlin file in Android Studio

Can't locate MainActivity.java file in Android Studio? Seems like you are new to Android Studio or Android programming, no worries, we will see how to locate this file.

  1. Look for 1.Project at the top left vertical bar.
  2. You would see folder: app
  3. Expand app folder -> You would see 3 folders with the same name e.g.: com.abc.example
  4. Expand the 1st folder -> you should see MainActivity file
  5. Double-click on it to open the file.

You can refer to the below image to co-relate the above steps.

Locate MainActivity in Android Studio
Locate MainActivity in Android Studio

✋️ Note: If you are using Kotlin instead of Java you will see MainActivity.kt file instead of MainActivity.java.

HashTags: #AndroidStudio #AndroidProgramming #Tutorial #Kotlin #MobileProgramming #AppDevelopment #MobileDevelopment.

This is not an AI-generated article but is demonstrated by a human.

Please support independent contributors like Code2care by donating a coffee.

Buy me a coffee!

Buy Code2care a Coffee!

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!