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.