我将此行添加到build.gradle底部的那一刻,因为它在Firebase指南Android Studio中提出了错误:
Cause: 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.DefaultDomainObjectCollection.isEmpty(DefaultDomainObjectCollection.java:246)
at org.gradle.api.internal.DelegatingDomainObjectSet.isEmpty(DelegatingDomainObjectSet.java:102)
at org.gradle.api.internal.DelegatingDomainObjectSet.isEmpty(DelegatingDomainObjectSet.java:102)
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)
答案 0 :(得分:0)
将类路径添加到Gradle,root build.gradle。
classpath 'com.google.gms:google-services:3.0.0'