issue in string array in xml file: Multiple substitutions specified in non-positional format and Found tag </item> where </string-array> is expected [duplicate]

怎甘沉沦 提交于 2019-12-18 03:53:48

问题


Possible Duplicate:
Android XML Percent Symbol

hi mate i have an array in file xml:

<string-array name="type_data_graph">
        <item>Veichle speed (Km/h)</item>
        <item>Engine Rpm (rpm)</item>
        <item>Barometric pressure (kPa absolute)</item>
        <item>Fuel pressure (kPa)</item>
        <item>Fuel Rail pressure of manifold vacuum (kPa)</item>
        <item>Fuel Rail pressure diesel/gasoline (kPa)</item>
        <item>MAF air flow rate (grams/sec)</item>
        <item>Intake MAP (kPa)</item>
         <item>Engine % torque (%) </item>       
......
    </string-array>

when commpile i get error on

     <item>Engine % torque (%) </item>       

the error is

Description Resource Path Location Type error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute? arrays.xml /DashboardDroid/res/values line 43 Android AAPT Problem

Description Resource Path Location Type error: Found tag where is expected arrays.xml /DashboardDroid/res/values line 43 Android AAPT Problem what means ??? i close all tag


回答1:


instead of

 Engine % torque (%)

try using

Engine %% torque (%%)

if you need a % in your strings.xml file

or try checking the link here

or else simply try giving

 formatted="false" 

in your

<string-array> 

tag



来源:https://stackoverflow.com/questions/12605684/issue-in-string-array-in-xml-file-multiple-substitutions-specified-in-non-posit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!