Reputation: 2019
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?
Upvotes: 1
Views: 352
Reputation: 2019
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
Upvotes: 0