Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Multiple substutions in leak_canary_about_message missing proper multiple substution markup #1630

Closed
DanEdgarTarget opened this issue Nov 20, 2019 · 1 comment
Milestone

Comments

@DanEdgarTarget
Copy link

DanEdgarTarget commented Nov 20, 2019

Description

[Description of the issue]
When using latest Leak Canary within Android Studio 3.5.2 we get the following warning generated from the leak_canary_about_message:

warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.

I think the fix is as simple as changing the string to include the positional markers:

<string name="leak_canary_about_message"><![CDATA[This is a dev extension for
  <b>%1$s</b> (<i>%2$s</i>), automatically added by the LeakCanary library.<br><br>
  <a href="https://github.com/square/leakcanary">LeakCanary</a> is a memory leak detection library for Android, created
  and open source by <a href="https://twitter.com/Piwai">Pierre-Yves Ricau</a> at <a href="https://square.github.io">Square</a>.<br><br>
  You can learn more about memory leaks at <a href="https://squ.re/leaks">https://squ.re/leaks</a>.<br><br>
  We welcome contributions from the community, please do not hesitate to
  <a href="https://github.com/square/leakcanary/issues">report an issue</a> or open a pull request!<br>
]]></string>

Steps to Reproduce

Just include latest Leak Canary, build, and watch your build warnings.

Expected behavior:
No warning and for the string to follow multiple substitution and formatting guidelines for Android Studio 3.5.2

Version Information

  • LeakCanary version: 1.6.3
  • Android OS version: N/A
  • Android Studio version: 3.5.2
@pyricau
Copy link
Member

pyricau commented Nov 23, 2019

Fixed by #1632

@pyricau pyricau closed this as completed Nov 23, 2019
@pyricau pyricau added this to the 2.0 Next Release milestone Nov 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants