您的位置:首页 > 移动开发 > Android开发

Error:(949) Multiple substitutions specified in non-positional format; Android格式化string.xml

2017-11-05 22:02 831 查看
string.xml问题代码

<string name="msg">书名:%s\n价格:%d</string>


异常信息

Error:(949) Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?

Error:(949) Unexpected end tag string

Error:(949) Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?

Error:(949) Unexpected end tag string

Error:Execution failed for task ':app:processDebugResources'.

> com.android.ide.common.process.ProcessException: Failed to execute aapt

解决办法:

<string name="msg">书名:%1$s\n价格:%2$d</string>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐