res/valuses/string.xml中定义字符串处错误,出错处如下:<string name="position_info">经度:%+.6f, 纬度:%+.6f</string>错误提示:
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
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
解决方案 »
- ksoap2 呼叫带参数的.Net Webservice问题
- 前提是ListView的数据比较多:用CheckBox来标记ListView的item,怎么控制CheckBox的显示和隐藏呢?
- eclipse 调试android程序,logcat显示似乎混乱了,如图
- android短信listview中长按一条短信,再横屏以后选择的数据改变
- android中以下两种httpclient设置连接超时的方式有什么不同
- Android中级进阶FAQ
- 大侠们。。关于进度条动态显示进度问题。。。
- Android 开机广播在小米手机(2s V5系统)无法接收
- 全局Application
- 这段XML,如何在JAVA里以代码形式显示,20分,先谢了
- android的activity之间的参数传递
- html解析啊啊啊啊啊啊啊啊
<string name="welcome_messages">Hello, %1$s! You have %2$d new messages.</string>如何在<string></string>中使用%号
有两个办法可供选择
1.用%%来表示1个%,和转意符号 \ 的用法相同
2.如果你的字符串不需要格式化,可以在你的<string 标签上增加一个属性:formatted="false"例如 <string name="test" formatted="false">% test %</string> 即可