关于字符串格式错误 [英] about string format wrong

查看:91
本文介绍了关于字符串格式错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这一行找到多个注释:      - 错误:非定位格式指定多重替换;您是不是要增加格式化=假      属性?      - 错误:预期的结束标记字符串

Multiple annotations found at this line: - error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute? - error: Unexpected end tag string

当我使用的字符串,如:你有%D预约(S)\ n..and%D任务(S)。我sdk2.2。我DONOT知道为什么会出现这样的错误。

when i use string like:You have %d appointment(s)\n..and %d task(s). my sdk2.2 .i donot know why appear this mistakes.

推荐答案

我觉得应该是
您有%1 $ d个约会(S)\ n..and%2 $ d个任务(S)

I think it should be
You have %1$d appointment(s)\n..and %2$d task(s)

检查了这一点
<一href="http://groups.google.com/group/android-developers/msg/3457068e42b4c8be">http://groups.google.com/group/android-developers/msg/3457068e42b4c8be

Check this out
http://groups.google.com/group/android-developers/msg/3457068e42b4c8be

这篇关于关于字符串格式错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆