首页 > 编程知识 正文

failed to convert value of type,each undeclared identifier is

时间:2023-05-06 11:11:11 阅读:276327 作者:826

make 编译android代码的出现这样的错误

这个问题可能是跟android 的版本有关系就是xml 中的String.xml文件的文字使用%s 无法识别引起的, 不过有些版本可以识别 

下面的就有可能引起Multiple substitutions specified in non-positional format; did you mean to add the formatted=”false”

<string name="test">距离过年还有%s天%s小时%s分钟</string>

处理方法就是在%后天添加1$ 或者 2$ 等, 我的处理方法如下.

<string name="test">距离过年还有%1$s天%2$s小时%3$分钟</string>

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。