Closed tompi closed 2 months ago
Hi,
I think it may be related to Android Studio/Lint/Java version. It used to warn about lack of formatted="false"
for strings with 2 or more parameters. Now it seems to warn when there is such attribute. I'll try adding it and see if that still compiles.
Is there any progress on this topic? I face the same issue when trying to use the latest 2.4.2 version of the library.
Thanks in advance.
Hi @tompi
Have you made any progress with this issue? I have the same problem on another SDK and it is also related to android library binding for maui.
I tried introducing positional format like "Uploading part %1$d/%2$d", but that didnt help.
I tried it myself by build an aar
file and used it to build a NuGet with bindings. For me this worked so hopefully the PR can solve this.
Yes, i just unzipped the aar, changed the xml file, rezipped and then bound the library. Cumbersome, but it works...
Having this exact same issue for the exact same cause when trying to build MAUI sample-apps. The build fails with the same kind of error:
0>values.xml(2): Error APT2000 : multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
0>values.xml: Error APT2261 : file failed to compile.
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:
This line seems to be causing the problem:
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