Gradle v6.3如何处理这些弃用警告



我在Android Studio中将Android Gradle插件更新到了v3.6.2版本,并将Grade升级到了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:Mahalayaappbuild.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:Mahalayaappbuildgeneratedap_generated_sourcesdebugout)))) 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

我刚开始在安卓系统中编程不久,我不知道该怎么处理这些警告。我不明白链接里说的是什么。感谢您的帮助。

更新:Gradle v6.5显示了相同的警告。

我认为这是由其中一个插件引起的。我也有:

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

我也认为他们会更新这些插件。这样贬低就不会成为问题。

最新更新