title: Why am I getting AbstractDynamicObject$CustomMessageMissingMethodException error?
body: <p>I have just started a new project and am trying to connect to Firebase.</p>
  <p>As soon as I try to build my project I got the error:</p>
  <blockquote>
  <p>Could not parse the Android application Module's Gradle Config</p>
  </blockquote>
  <p>So I looked in my build which told me that jCenter() was deprecated and that I should remove it. When I removed it, everything worked fine. However, when I tried to connect to Firebase I got the error:</p>
  <blockquote>
  <p>AbstractDynamicObject$CustomMessageMissingMethodException.</p>
  </blockquote>
  <p><strong>What may be causing this?</strong></p>
  <p>Full stack trace:</p>
  <pre><code>    Caused by: java.lang.RuntimeException: com.android.build.gradle.internal.crash.ExternalApiUsageException: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method setVariantDir() for arguments [debug] on task ':app:processDebugGoogleServices' of type com.google.gms.googleservices.GoogleServicesTask.
      at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:71)
      at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:54)
      at com.android.build.gradle.internal.profile.AnalyticsResourceManager.recordBlockAtConfiguration(AnalyticsResourceManager.kt:206)
      at com.android.build.gradle.internal.profile.AnalyticsConfiguratorService.recordBlock(AnalyticsConfiguratorService.kt:85)
      at com.android.build.gradle.internal.plugins.BasePlugin.lambda$createTasks$9(BasePlugin.java:582)
      at com.android.build.gradle.internal.crash.CrashReporting$afterEvaluate$1.execute(crash_reporting.kt:37)
      at com.android.build.gradle.internal.crash.CrashReporting$afterEvaluate$1.execute(crash_reporting.kt)
  </code></pre>