我在Android中将Android插件更新为v3.6.2,升级到v6.3。当我使用编译器选项--warning-mode all
运行一个构建时,我会得到以下两个弃用警告:
1:
Configure project :app
Internal API constructor DefaultDomainObjectSet(Class<T>) has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use ObjectFactory.domainObjectSet(Class<T>) instead. See https://docs.gradle.org/6.3/userguide/custom_gradle_types.html#domainobjectset for more details.
at build_gklh609eby8f87cnghyses56.run(E:\Mahalaya\app\build.gradle:1)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
2:
Querying the mapped value of map(property(interface org.gradle.api.file.Directory, property(interface org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory, E:\Mahalaya\app\build\generated\ap_generated_sources\debug\out)))) before task ':app:compileDebugJavaWithJavac' has completed has been deprecated. This will fail with an error in Gradle 7.0. Consult the upgrading guide for further information: https://docs.gradle.org/6.3/userguide/upgrading_version_6.html#querying_a_mapped_output_property_of_a_task_before_the_task_has_completed
我已经很久没有开始用Android编程了,我也不知道该如何处理这些警告。我不明白链接里说的是什么。任何帮助都是非常感谢的。
更新: Gradle v6.5显示相同的警告。
发布于 2020-04-23 17:08:54
我认为这是由其中一个插件引起的。我也有:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
我也认为他们也会更新这些插件。这样就不会有问题了。
https://stackoverflow.com/questions/60988088
复制相似问题