即使在lint.xml中指定的话,也不会被抑制的生成来源的折旧警告

发布于 2025-02-13 04:19:22 字数 685 浏览 0 评论 0 原文

在我们的Android项目中,针对API 33引起了很多折旧警告。特别是,导航ARGS生成的代码仍在使用捆绑包的不推荐使用的用法(请参阅我提交的此问题: https://issuetracker.google.com/u/1/issues/237725966

警告看起来像这样:'get(string!):有吗?被弃用。在Java中弃用

以解决此问题,我在我们的 lint.xml 文件中指定了以下内容:

    <issue id="Deprecated" severity="ignore">
        <ignore path="build" />
    </issue>

这是不起作用的。更改路径,以便将球用于类似的东西:

<ignore path="**/build/generated/source/navigation-args/**" />

这也不起作用。

有人知道如何解决这个问题吗?

In our Android project, targeting API 33 caused a lot of deprecation warnings. In particular, the generated code for navigation args are still using deprecated usages of Bundle.get (see this issue I filed: https://issuetracker.google.com/u/1/issues/237725966)

The warnings look like this: 'get(String!): Any?' is deprecated. Deprecated in Java

To get around this, I specified the following in our lint.xml file:

    <issue id="Deprecated" severity="ignore">
        <ignore path="build" />
    </issue>

This did not work. Changing the path so that it uses globbing to something like:

<ignore path="**/build/generated/source/navigation-args/**" />

This doesn't work as well.

Anyone knows how to get around this issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

仄言 2025-02-20 04:19:22

只是为了更新我的问题,应该在导航2.5.1中已解决此问题,请参见此评论在问题跟踪器中。至于我如何解决这个问题,我没有等待上述修复程序,而是重构我们的应用程序仅将原始参数用作导航参数

Just to update my question, this issue is supposed to be fixed already in Navigation 2.5.1, see this comment in the issue tracker. As to how I resolved this, I didn't wait for the said fix and instead, refactored our app to only use primitive arguments as navigation arguments

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文