I updated Android Gradle Plugin to v3.6.2 and Grade to v6.3 in Android Studio. When I run a build with the compiler option --warning-mode all
, I get the following two deprecation warnings:
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.)
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
It hasn't been a long time since I have started programming in Android, and I have no idea about what to do about these warnings. I can't understand what is being said in the links. Any help is appreciated.
Update: Gradle v6.5 shows the same warnings.
One way to upgrade the Gradle version is manually change the distributionUrl property in the Wrapper's gradle-wrapper. properties file. The better and recommended option is to run the wrapper task and provide the target Gradle version as described in Adding the Gradle Wrapper.
If you've updated your Android Studio to 1.3. 2 version then I would suggest using Build Tools Version 23.0. 0 and compile API 23 Android 6.0. As for Gradle Version - 2.4 or higher up to latest 2.7.
I think it is caused by one of these plugins. I have it too:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
And i also think they will update these plugins as well. So that the deprecation would not be a problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With