Android-DFU-Library
Android-DFU-Library copied to clipboard
Problems with binding for xamarin/maui: string with multiple placeholders
Version
2.4.1 (Latest)
Ask the question
Hi, am tagging this as a question, since I dont think this is your bug....
I had some problems binding the latest version, specifically when using produced binding library in a Maui application, I get this compile time error:
res/values/values.xml(2): error APT2000: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
This line seems to be causing the problem:
<string name="dfu_status_uploading_part">Uploading part %d/%d…</string>
I tried introducing positional format like "Uploading part %1$d/%2$d", but that didnt help. When I just used "Uploading part %d", it worked...
I see you removed the formatted=false on October 2 in commit 4a5c18d (I assume since formatted=false would not interpolate, so you probably just got the percent signs?)
Anyway, I know this is not your problem, but MAYBE you could change it to just have one substitution? (just build the x/y in code and substitute for an %s in the xml)
Its a bit dirty, so I totally understand if you wont do it...
Relevant log output
No response