Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build fails with com.google.gms:google-services:3.2.0 because of StackOverflowError

I just switched from

classpath 'com.google.gms:google-services:3.1.1'

to

classpath 'com.google.gms:google-services:3.2.0'

As result in Android Studio my build fails with following exception:

Caused by: java.lang.StackOverflowError
at org.gradle.api.internal.DefaultDomainObjectCollection.isEmpty(DefaultDomainObjectCollection.java:246)
at org.gradle.api.internal.CompositeDomainObjectSet$DomainObjectCompositeCollection.isEmpty(CompositeDomainObjectSet.java:172)
at org.gradle.api.internal.CompositeDomainObjectSet.iterator(CompositeDomainObjectSet.java:111)
at org.gradle.api.internal.DelegatingDomainObjectSet.iterator(DelegatingDomainObjectSet.java:106)
at org.gradle.api.internal.CompositeDomainObjectSet$DomainObjectCompositeCollection.iterator(CompositeDomainObjectSet.java:201)
at org.gradle.api.internal.SetIterator.of(SetIterator.java:34)
at org.gradle.api.internal.CompositeDomainObjectSet.iterator(CompositeDomainObjectSet.java:114)
at org.gradle.api.internal.DelegatingDomainObjectSet.iterator(DelegatingDomainObjectSet.java:106)
at org.gradle.api.internal.CompositeDomainObjectSet$DomainObjectCompositeCollection.iterator(CompositeDomainObjectSet.java:201)
at org.gradle.api.internal.SetIterator.of(SetIterator.java:34)
at org.gradle.api.internal.CompositeDomainObjectSet.iterator(CompositeDomainObjectSet.java:114)
at org.gradle.api.internal.DelegatingDomainObjectSet.iterator(DelegatingDomainObjectSet.java:106)
at org.gradle.api.internal.CompositeDomainObjectSet$DomainObjectCompositeCollection.iterator(CompositeDomainObjectSet.java:201)
at org.gradle.api.internal.SetIterator.of(SetIterator.java:34)
at org.gradle.api.internal.CompositeDomainObjectSet.iterator(CompositeDomainObjectSet.java:114)
at org.gradle.api.internal.DelegatingDomainObjectSet.iterator(DelegatingDomainObjectSet.java:106)
at org.gradle.api.internal.CompositeDomainObjectSet$DomainObjectCompositeCollection.iterator(CompositeDomainObjectSet.java:201)
at org.gradle.api.internal.SetIterator.of(SetIterator.java:34)
at org.gradle.api.internal.CompositeDomainObjectSet.iterator(CompositeDomainObjectSet.java:114)
at org.gradle.api.internal.DelegatingDomainObjectSet.iterator(DelegatingDomainObjectSet.java:106)
at com.google.gms.googleservices.GoogleServicesPlugin.getAllDependencies(GoogleServicesPlugin.groovy:267)
at com.google.gms.googleservices.GoogleServicesPlugin.getAllDependencies(GoogleServicesPlugin.groovy:274)
at com.google.gms.googleservices.GoogleServicesPlugin.getAllDependencies(GoogleServicesPlugin.groovy:274)
at com.google.gms.googleservices.GoogleServicesPlugin.getAllDependencies(GoogleServicesPlugin.groovy:274)

The build is also successful when I build from command line or when I remove from build file

apply plugin: 'com.google.gms.google-services'

As side note: I am also using google maps and firebase products of version 12.0.0 like crashlytics and analytics. Additionally the project is structured with a base-feature and multiple sub-features as described in https://developer.android.com/topic/instant-apps/getting-started/structure.html

Any idea what might be wrong and how to fix it?

like image 547
lilienberg Avatar asked Mar 26 '18 12:03

lilienberg


1 Answers

This has been fixed in version 3.2.1 of the Google Play Services plugin.

like image 68
Sven Jacobs Avatar answered Oct 05 '22 12:10

Sven Jacobs