Reason
My Xamarin project uses multiple languages and their translations are stored in Resource/.resx files. When I build the project in VS 2015 the android project not built successfully and it gave me an error…
Error
Multiple substitutions specified in non-positional format;
did you mean to add the formatted=”false” attribute?
Mobility_App.Droid F:\Mobility_App.Droid\Resources\Values-fr\AppResources.xml

Image 1 : Error
Reason
I search the error and I found the issue occurred because some <string> tags consists of percentage(%) symbol.

Image 2 : Reason % symbol
Solution
To fix this error we have to add a attribute “Formatted” to <string> tags which are consists of ‘%’ symbols. and Set “Formatted” attribute’s value to “false”.

Image 3 : add <string formatted=”false”>
Now the issue has fixed and to ensure, then rebuild the project and you can see the solution is success.

Image 4 : Successfully Build
Thanks you !
Thank you very much.
LikeLiked by 1 person
Welcome !
LikeLike
Hi blogger, do you monetize your xamarinsharp.com ?
There is easy way to earn extra money every day,
just search on youtube – How to earn with wordai 4
LikeLike
Hi there!
How did you find out about the formatted attribute?
I couldn’t find anything in the official android documentation.
Thanks.
LikeLike
I saw that solution in some forum. But sorry I couldn’t add it as a reference.
LikeLike
Yeah… same here.
It’s like it’s a secret. “There’s this attribute you could use, but we won’t tell you what it is.” :)))
Thanks.
LikeLike