Compiling with debugging information

After building this sample android kotlin project using either ./gradlew assembleDebug or ./gradlew installDebug I checked ./app/build/intermediates/javac/debug/classes/org/gradle/samples/MainActivity.class for debug information and received the following warning:

  $ javap -l MainActivity
    Warning: File ./MainActivity.class does not contain class MainActivity
    Compiled from ""
    public class org.gradle.samples.MainActivity extends {
      public org.gradle.samples.MainActivity();
          line 9: 0
          line 11: 4
          line 12: 9
          Start  Length  Slot  Name   Signature
              0      21     0  this   Lorg/gradle/samples/MainActivity;
      protected void onCreate(android.os.Bundle);
          line 16: 0
          line 17: 5

Why this warning message appears even though the class definition and debug information are being displayed correctly?

Besides that you used a Gradle sample as target, this question has nothing to do with Gradle.
It is a question about how to properly use the javap utility.
It would be nice if you would in future restrict questions in the Gradle community forums to those relating to Gradle.

Nevertheless, do cd ../../.. and then javap -l org.gradle.samples.MainActivity and you will not get a warning.
The class is not MainActivity but org.gradle.samples.MainActivity.
But you call it like the class name were MainActivity and as you call it from the place where the class file is, it finds the file by naming convention but then sees that the class in there is a different one and warns you about that fact but still shows the output.