I recently upgraded my Android Studio (and Gradle Plugin) to version 4.0, and now when I build my project I get:
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use
--warning-mode allto show the individual deprecation warnings.
Then, when I set org.gradle.warning.mode=all in gradle.properties, I get this below :app:generateSafeArgsDebug task:
Property
applicationIdis not annotated with an input or output annotation. This behaviour has been deprecated and is scheduled to be removed in Gradle 7.0.Property
applicationIdResourceis not annotated with an input or output annotation. This behaviour has been deprecated and is scheduled to be removed in Gradle 7.0.
I've read Gradle version 6.1.1 and plugin version 4.0.0 in android studio in Gradle Forums, which suggests that the problem could be caused by outdated dependencies, but I have all the latest versions and the problem remains.
How can I fix this warning?
"androidx.navigation:navigation-safe-args-gradle-plugin" is the cause of the "app:generateSafeArgsDebug" task.
By upgrading it (to the 2.3.1 version, for example), theses warnings will disappear.
Other warnings will raise:
WARNING: DSL element 'android.dataBinding.enabled' is obsolete and has been replaced with 'android.buildFeatures.dataBinding'.
It will be removed in version 5.0 of the Android Gradle plugin.
WARNING: API 'BaseVariant.getApplicationIdTextResource' is obsolete and has been replaced with 'VariantProperties.applicationId'.
It will be removed in version 5.0 of the Android Gradle plugin.
For more information, see TBD.
To determine what is calling BaseVariant.getApplicationIdTextResource, use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
But maybe easier to solve (and less stacktrace-styled)
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