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>

Error:(949) Multiple substitutions specified in non-positional format; Android格式化string.xml的更多相关文章

  1. 【我的Android进阶之旅】解决strings.xml格式化占位符错误: Multiple substitutions specified in non-positional format

    今天有一个Android新手使用strings.xml进行格式化的时候报了占位符错误, Multiple substitutions specified in non-positional forma ...

  2. cocos2dx android版本移植时的Error format not a string literal and no format arguments解决方案

    原文地址 : http://www.cnblogs.com/hhuang2012/p/3336911.html cocos2dx android版本移植时的Error format not a str ...

  3. Error format not a string literal and no format arguments解决方案

    原地址: http://blog.csdn.net/joeblackzqq/article/details/25985299 cData.cpp:355:30:error:format not a s ...

  4. Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; neste

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto ...

  5. Android string.xml error: Apostrophe not preceded by \

    Android string.xml error: Apostrophe not preceded by \ 遇到了这个错误,编译无法通过 error: Apostrophe not preceded ...

  6. Error: Default interface methods are only supported starting with Android N (--min-api 24): java.io.InputStream org.apache.poi.sl.usermodel.ObjectShape.readObjectData()

    项目运行的时候,如果报错 Error: Default interface methods are only supported starting with Android N (--min-api ...

  7. Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment:

    Administrator@DESKTOP-EHCTIOR MINGW64 /d/react-native-eyepetizer (master) $ react-native run-android ...

  8. 【开发遇到的问题】Spring Mvc使用Jackson进行json转对象时,遇到的字符串转日期的异常处理(JSON parse error: Can not deserialize value of type java.util.Date from String[)

    1.问题排查 - 项目配置 springboot 2.1 maven配置jackson - 出现的场景: 服务端通过springmvc写了一个对外的接口,查询数据中的表,表中有一个字段属性是时间戳,返 ...

  9. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stu' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stu' defined ...

随机推荐

  1. x64内联汇编调用API(需intel编译器,vc不支持x64内联汇编)

    #include "stdafx.h" #include <windows.h> STARTUPINFOW StartInfo  = {0}; PROCESS_INFO ...

  2. Qt之界面数据存储与获取(userData)

    http://blog.csdn.net/u011012932/article/details/52413012#comments

  3. javascript 实现ajax

    AJAX 英文名称 Asynchronous JavaScript and XML即异步的 JavaScript 和 XML AJAX 是与服务器交换数据并更新部分网页一门无刷新技术构建自己的ajax ...

  4. [迟到的万圣节向]可怕的python

    什么?python简单易懂好学可读性高灵活耐用扩展好? 预测下面几个小段落的输出,来看看这个能过几关? ============================ Stage 1 预测下列输出 def ...

  5. Arcgis Server 10.4.1 搭建集群环境

    1.准备工作 Arcgis Server 10.4.1  以及许可一枚 共享存储(通过UNC路径访问,如"\\server1\arcgisserver\") 服务器两台(虚拟机也可 ...

  6. 响应式与bootstrap

    一.单双击问题 <body> <button>按钮</button> <script src="./jQuery.js"></ ...

  7. SYN5605型 多通道时间间隔测量仪

      SYN5605型 多通道时间间隔测量仪 时间间隔测量设备多通道时间间隔测量32路时间间隔测量仪使用说明视频链接; http://www.syn029.com/h-pd-80-0_310_6_-1. ...

  8. 深入理解ES6 - var-let-const

    知识点 var 声明变量: 1.存在变量提升,实际上var无论在哪里声明,都会被当做当前的作用域顶部声明变量. 2.可以重复声明,后声明的变量会覆盖前声明的变量. let 声明变量: 1.不存在变量提 ...

  9. happy machine learning(Second One)

    发现机器学习就根本停不下来 今天来用RNN算法来爽爽僵尸网络宿主预测 首先我们下载好数据,然后打开我们可爱的熊猫 import numpy as np import pandas as pd impo ...

  10. IM推送保障及网络优化详解(一):如何实现不影响用户体验的后台保活

    对于移动APP来说,IM功能正变得越来越重要,它能够创建起人与人之间的连接.社交类产品中,用户与用户之间的沟通可以产生出更好的用户粘性. 在复杂的 Android 生态环境下,多种因素都会造成消息推送 ...