Error is missing ";" in public static final int welcome Text = 0x7f0700a3;

0

I have an error in the R.java class. He tells me that he is missing ";" in that class. This is very unusual. I would like to know how to fix it and why does this happen? code that gives the error in R.java is the following

public static final int welcome Text=0x7f0700a3;
    
asked by Host MontoyaRivera 14.03.2018 в 18:06
source

2 answers

0

Spaces are not allowed in identifiers.

public static final int welcomeText=0x7f0700a3;

The compiler waits

[modificadores] [tipo] [identificador] [opcional: asignación de valor];

Since after the identifier he finds another identifier, he gets confused and asks for the ";" What are you waiting for?

    
answered by 14.03.2018 в 18:26
-1

You are defining a TextView with a "welcome Text" id, this is not allowed:

<TextView
        android:id="@+id/welcome Text"

for this reason you get an error:

you must change the id of TextView , avoiding spaces:

<TextView
        android:id="@+id/welcomeText"

fix the above and your references to this TextView , then build your project again.

    
answered by 14.03.2018 в 18:18