title: Cause: buildOutput.apkData must not be null
body: <p>My android application using Kotlin is throwing this exception when I try to Run 'app' in the emulator o in my cellphone. When I build my project it runs well, with no errors.</p>
  
  <p>I am using: </p>
  
  <ul>
  <li>SDK 28 (Android 9.0 (Pie))</li>
  <li>Gradle 5.1.1</li>
  <li>Gradle Plugin 3.5.0-alpha03</li>
  <li>Kotlin 1.3.10</li>
  <li>Java 1.8.0_151</li>
  <li>OSX 10.13.2</li>
  </ul>
  
  <pre><code>    org.gradle.internal.exceptions.LocationAwareException: buildOutput.apkData must not be null
          at org.gradle.initialization.exception.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:99)
          at org.gradle.initialization.exception.DefaultExceptionAnalyser.collectFailures(DefaultExceptionAnalyser.java:65)
          at org.gradle.initialization.exception.MultipleBuildFailuresExceptionAnalyser.transform(MultipleBuildFailuresExceptionAnalyser.java:39)
          at org.gradle.initialization.exception.StackTraceSanitizingExceptionAnalyser.transform(StackTraceSanitizingExceptionAnalyser.java:29)
          at org.gradle.initialization.DefaultGradleLauncher.finishBuild(DefaultGradleLauncher.java:194)
          at org.gradle.initialization.DefaultGradleLauncher.finishBuild(DefaultGradleLauncher.java:141)
          ...
      Caused by: java.lang.IllegalStateException: buildOutput.apkData must not be null
          at com.android.build.gradle.internal.ide.EarlySyncBuildOutput$Companion$load$2.invoke(EarlySyncBuildOutput.kt:103)
          at com.android.build.gradle.internal.ide.EarlySyncBuildOutput$Companion$load$2.invoke(EarlySyncBuildOutput.kt:67)
          at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:174)
          at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:691)
          at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:721)
          at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:712)
          ...
  </code></pre>