title: Error in gradle Android studio: "Cannot invoke method get() on null object"
body: <p>I have a projects with number of modules, each one is a separate app.
  I added Firebase to one module, and since then another one's gradle cannot be sync.
  I keep getting: "Cannot invoke method get() on null object", which disappear when I comment out the play-service" dependencies.
  My gradle is:</p>
  
  <pre><code>buildscript {
      repositories {
          google()
          maven { url 'https://maven.fabric.io/public' }
      }
  
      dependencies {
          classpath 'io.fabric.tools:gradle:1.+'
      }
  }
  apply plugin: 'com.android.application'
  apply plugin: 'io.fabric'
  
  repositories {
      maven { url 'https://maven.fabric.io/public' }
  }
  
  
  android {
      compileSdkVersion 27
      buildToolsVersion "27.0.3"
  
      defaultConfig {
          applicationId "xxxx"
          minSdkVersion 14
          targetSdkVersion 27
  
  //        multiDexEnabled true
  
          compileOptions {
              sourceCompatibility JavaVersion.VERSION_1_7
              targetCompatibility JavaVersion.VERSION_1_7
          }
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
      }
  
  }
  
  dependencies {
      implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
          transitive = true;
      }
      implementation 'com.android.support:support-v4:27.1.1'
      implementation 'com.android.support:appcompat-v7:27.1.1'
      implementation 'com.android.support:cardview-v7:27.1.1'
      implementation 'com.google.android.gms:play-services-location:15.0.1'
      implementation 'com.google.android.gms:play-services-maps:15.0.1'
  }
  </code></pre>
  
  <p>The top-level project gradle:</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
          google()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.1.3'
      }
  }
  
  allprojects {
      repositories {
          jcenter()
          google()
      }
  }
  </code></pre>
  
  <p>I use gradle version 4.4 and Android plugin version 3.1.3
  The error's stack</p>
  
  <pre><code>java.lang.NullPointerException: Cannot invoke method get() on null object
      at
   org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
      at
   org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
      at
   org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at
   org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:35)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at
   org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:57)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      at com.google.gms.googleservices.GoogleServicesPlugin$1$_afterResolve_closure1.doCall(GoogleServicesPlugin.groovy:316)
      at
   sun.reflect.GeneratedMethodAccessor357.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at
   java.lang.reflect.Method.invoke(Method.java:498)
      at
   org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at
   groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at
   org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
      at
   groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      at
   groovy.lang.Closure.call(Closure.java:414)
      at
   groovy.lang.Closure.call(Closure.java:430)
  
  (another 150 lines)
  </code></pre>
  
  <p>Any suggestion will help,
  Cheers.</p>