title: Getting Lint infrastructure error when lint baseline file is configured in android build
body: <p>I am getting the following exception when I enable lint with baseline file configuration.</p>
  
  <pre><code>&gt; Lint infrastructure error
    Caused by: java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  .........................
  .........................
   Caused by: java.lang.IllegalStateException: path must not be null
          at com.android.tools.lint.XmlReporter.writeIssue(XmlReporter.kt:209)
          at com.android.tools.lint.XmlReporter.writeIssues(XmlReporter.kt:113)
          at com.android.tools.lint.XmlReporter.write(XmlReporter.kt:99)
          at com.android.tools.lint.LintCliClient.run(LintCliClient.java:288)
  </code></pre>
  
  <p>I added following lintOptions in my module build.gradle</p>
  
  <p>After which I ran lintDebug gradle task. </p>
  
  <pre><code>
      android{
          lintOptions {
              baseline file("lint-baseline.xml")
              warningsAsErrors true
              abortOnError true
          }
      }
  
  </code></pre>
  
  <p>I was expecting my changes to create lint-baseline.xml file in module root directory for the first run and fail the build indicating creation of lint-baseline.xml. For the second run the lint should read lint-baseline.xml and suppress the existing error/warning reporting.</p>
  
  <p>But the first run creates empty lint-baseline.xml and fails with Lint infrastructure error. The subsequent runs did not produce Lint infrastructure error but because the file is empty, the comparison fails resulting in errors/warnings.</p>
  
  <p>My app has both java and kotlin files.</p>