title: R8: NullPointerException during IR Conversion
body: <p>I have a problem when trying to generate a release version of my app. It gives a strange error </p>
  
  <pre><code>C:\Users\rshal\.gradle\caches\transforms-2\files-2.1\6c326691eb00442622017dd95f96e92a\jetified-firebase-config-19.1.3-runtime.jar: R8: NullPointerException during IR Conversion
  &gt; Task :app:minifyProdReleaseWithR8 FAILED
  </code></pre>
  
  <p>I have been using firebase analytics and firebase remote config without problems. And also I had no issue this R8 minimization.
  Recently I have integrated <code>google-speech-api</code> and after that, I am not able to use R8. </p>
  
  <p>I did not have this problem until I integrated <code>google-speech-api</code> in the app. I know that  <code>google-speech-api</code> is not officially supported on Android. Maybe that is the core issue. Before that, I had an issue with <code>firebase-config</code> dependency. It is not compatible with the <code>google-speech-api</code> library I think. I solved that issue with this Gradle configuration </p>
  
  <pre><code>implementation('com.google.firebase:firebase-config', {
      exclude group: 'com.google.protobuf' // google-cloud-speech causes this. see  https://github.com/firebase/firebase-android-sdk/issues/1143
  })
  </code></pre>
  
  <p>I have followed <a href="https://github.com/firebase/firebase-android-sdk/issues/1143" rel="nofollow noreferrer">this</a> fix.</p>
  
  <p>Now I am stuck with this error that I showed above. </p>
  
  <p>I have tried different versions on R8 as suggested <a href="https://issuetracker.google.com/issues/150325706" rel="nofollow noreferrer">here</a> </p>
  
  <p>This is gradle build log </p>
  
  <pre><code>&gt; Task :app:minifyProdReleaseWithR8
  R8: Missing class: org.apache.logging.log4j.spi.ExtendedLoggerWrapper
  R8: Missing class: org.eclipse.jetty.npn.NextProtoNego$ClientProvider
  R8: Missing class: javax.servlet.ServletContextListener
  R8: Missing class: org.jboss.marshalling.ByteOutput
  R8: Missing class: java.lang.ClassValue
  R8: Missing class: org.eclipse.jetty.alpn.ALPN$ClientProvider
  R8: Missing class: org.jboss.marshalling.ByteInput
  R8: Missing class: org.eclipse.jetty.alpn.ALPN$ServerProvider
  R8: Missing class: org.eclipse.jetty.npn.NextProtoNego$ServerProvider
  R8: Library class android.net.http.AndroidHttpClientConnection implements program class org.apache.http.HttpInetConnection
  R8: Library class android.net.http.AndroidHttpClientConnection implements program class org.apache.http.HttpConnection
  C:\Users\rshal\.gradle\caches\transforms-2\files-2.1\6c326691eb00442622017dd95f96e92a\jetified-firebase-config-19.1.3-runtime.jar: R8: NullPointerException during IR Conversion
  
  &gt; Task :app:minifyProdReleaseWithR8 FAILED
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':app:minifyProdReleaseWithR8'.
  &gt; com.android.tools.r8.CompilationFailedException: Compilation failed to complet
  </code></pre>
  
  <p>this is <code>build.gradle</code> <a href="https://codeshare.io/50OyWl" rel="nofollow noreferrer">file</a></p>
  
  <p><a href="https://codeshare.io/5gzoYR" rel="nofollow noreferrer">this</a> is top-level Gradle file</p>