由于StackOverflowError,使用com.google.gms:google-services:3.2.0构建失败

时间:2018-03-26 12:41:42

标签: android gradle google-play-services

我刚从

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

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

在Android Studio中,我的构建失败,出现以下异常:

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)

当我从命令行构建或从构建文件中删除

时,构建也很成功
apply plugin: 'com.google.gms.google-services'

作为旁注:我也使用版本12.0.0的谷歌地图和firebase产品,如崩溃和分析。此外,该项目采用基本功能和多个子功能构建,如https://developer.android.com/topic/instant-apps/getting-started/structure.html

中所述

知道可能出现的问题以及解决方法吗?

1 个答案:

答案 0 :(得分:9)

Google Play服务插件的版本3.2.1已修复此问题。