出现的问题:安卓出现字符串带百分号的情况,AS高级版本编译时出现下面问题:Error:(3575) Multiple substitutions specified in non-positional format; did you mean to add the formatted=”false” attribute?
原因:string.xml中的 % 导致编译失败
解决:其实,编译器已经提醒了,在string标签里面加formatted=”false”
<string name="desc3" formatted="false">%asd%da%dsa</string>
- 网上还有一种办法的,就是加$符号,不过非常不不不灵活,最好用上面方式简单粗暴