user1468102
user1468102

Reputation: 391

Android: XML resources (values)

I must make a few translations for my app. But when I compile my app, console write:

[2012-11-24 15:31:43 - com.ddm.ctimer.MainForm] W/ResourceType( 4892): Bad XML block: header size 297 or total size 0 is larger than data size 0
[2012-11-24 15:31:43 - com.ddm.ctimer.MainForm] C:\Users\Roman\Desktop\NewTimer\NewTimer\res\values-fr\strings.xml:6: error: Found text "
[2012-11-24 15:31:43 - com.ddm.ctimer.MainForm] В В В В  " where item tag is expected

Code:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">CTimer</string>
<!--RUS strings-->
    <!--MainForm-->
    <string name="main_form_sec">Chronomètre</string>
     <string name="main_form_tim"> Minuterie </string>
     <string name="main_form_set"> Paramètres </string>
<string name="main_form_bg">#000000</string>

    <!--Menu-->
    <string name="menu_about">À propos du programme</string>
    <string name="menu_buy">Supprimer les annonces</string>
    <!--Preferences(Settings)-->

Upvotes: 1

Views: 222

Answers (2)

lenik
lenik

Reputation: 23508

Most probably you have a problem with the encoding, resource files are supposed to be encoded in UTF-8.

Please, try to replace "Chronomètre" with something in plain English and see if your error disappears or moves to the next "translated" line.

Upvotes: 1

Artyom Kiriliyk
Artyom Kiriliyk

Reputation: 2513

It's better to use colors.xml for colors:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="main_form_bg">#000000</color>
</resources>

Upvotes: 1

Related Questions