Search code examples
androidsyntax-errorgenerated-code

Android generated R Class - syntax Error


I have a project and its generated R class, generate its first string id in a strange form, "=" and the resource name are switched!

public static final class string {
    public static final int  = setting_ringtone1 0x7f06000e;
    public static final int about_disclaimer = 0x7f060015;
            .....    

I tried already to change the name, but it doesn't works either!

Is someone facing this problem?


Solution

  • At the time I was writing the question I founded a soution! So I answering my own question.

    In your string.xml please don't use a space char like

    <string name=" setting_notification"> ...

    instead of

    <string name="setting_notification"> ...

    The xml parser will prompt any error messages and your R will be generated with the sintax error!

    Im my case I didn't see soon the problem, becuse all my strings are automatically generated from a URL, where all my strings are.