侧边栏壁纸
  • 累计撰写 416 篇文章
  • 累计创建 65 个标签
  • 累计收到 145 条评论

目 录CONTENT

文章目录

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. 解决

Z同学
2021-07-23 / 0 评论 / 1 点赞 / 5,937 阅读 / 1,157 字
温馨提示:
本文最后更新于 2021-11-18,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

问题:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings

解释:

因为我们的Gradle之中使用了老版本的特性,在新的gradle之中被废弃了。

这是一个警告。

解决:

通过Terminal 面板: 直接输入 gradlew --warning-mode all

得到具体的哪些方法被新版本给抛弃了。

然后再根据结果进行处理。

该替换指令的替换指令。调整方法的调整方法。

例如:

https://docs.gradle.org/6.5/userguide/upgrading_version_5.html#legacy_publicat
ion_system_is_deprecated_and_replaced_with_the_publish_plugins
        at gitlab_fsvu4kygtdn7d0z4de.run(D:\DeviceModule-
android_smart\code\Module\device\gitlab.gradle:1)
        (Run with --stacktrace to get the full stack trace of this
 deprecation warning.)

//这个就是说的我的哪个配置不对和建议修改方式。
If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to D:\AndroidSDK\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.



> Task :help

Welcome to Gradle 6.5.

To run a build, run gradlew <task> ...

To see a list of available tasks, run gradlew tasks

To see a list of command-line options, run gradlew --help

To see more detail about a task, run gradlew help --task <task>

例如我的NDK路径不对

按照这种要求,能够改的就进行修改即可

1

评论区