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 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.



Recent Posts:




Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.