Android Studio 3.4 Canary 3 编译错误
Android Studio 3.4 Canary 3 Compile error
我无法执行干净构建,使用 Android Studio 的最新预览版重建,这样做会引发错误。
Unsupported type
(com.google.gms.googleservices.GoogleServicesPlugin$Version) found for field
'rangeStart' while constructing immutable class
com.google.gms.googleservices.GoogleServicesPlugin$VersionRange.
Immutable classes only support properties with effectively immutable types including:
- Strings, primitive types, wrapper types, Class, BigInteger and BigDecimal, enums
- classes annotated with @KnownImmutable and known immutables (java.awt.Color, java.net.URI)
- Cloneable classes, collections, maps and arrays, and other classes with special handling
(java.util.Date and various java.time.* classes and interfaces)
Other restrictions apply, please see the groovydoc for ImmutableOptions for further details
正在执行 gradlew clean
结果
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
这个是什么意思,解决方法是什么?
现在,您应该在项目级别 build.gradle.
中将 google-services 版本降级到 3.2.0
dependencies {
classpath 'com.google.gms:google-services:3.2.0'
}
一旦我有更多相关信息,将在此处更新。
我终于通过更新到最新的 google 服务解决了问题 here
然后将我的 firebase 依赖项更新到最新版本。
classpath 'com.google.gms:google-services:4.2.0'
我无法执行干净构建,使用 Android Studio 的最新预览版重建,这样做会引发错误。
Unsupported type
(com.google.gms.googleservices.GoogleServicesPlugin$Version) found for field
'rangeStart' while constructing immutable class
com.google.gms.googleservices.GoogleServicesPlugin$VersionRange.
Immutable classes only support properties with effectively immutable types including:
- Strings, primitive types, wrapper types, Class, BigInteger and BigDecimal, enums
- classes annotated with @KnownImmutable and known immutables (java.awt.Color, java.net.URI)
- Cloneable classes, collections, maps and arrays, and other classes with special handling
(java.util.Date and various java.time.* classes and interfaces)
Other restrictions apply, please see the groovydoc for ImmutableOptions for further details
正在执行 gradlew clean
结果
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
这个是什么意思,解决方法是什么?
现在,您应该在项目级别 build.gradle.
中将 google-services 版本降级到 3.2.0dependencies {
classpath 'com.google.gms:google-services:3.2.0'
}
一旦我有更多相关信息,将在此处更新。
我终于通过更新到最新的 google 服务解决了问题 here 然后将我的 firebase 依赖项更新到最新版本。
classpath 'com.google.gms:google-services:4.2.0'