Syntax error on token "123", invalid Variabledeclaratorid

Asked

Viewed 70 times

0

I’ve got an R-class error.

inserir a descrição da imagem aqui

  • 1

    I don’t understand java, but the variable name is 123 ? is possible ? already tried for a letter at the beginning to see if the error persists ?

  • I can’t change the R.java

1 answer

0


These variables in the static and final class drawable within the class R are references to files of the same name in the folder res/drawable of your project. Make sure you have no file named 123 in this folder, as the reference will fail since in Java you cannot have a variable name that starts with a number.

  • There’s an image with the name 123.png inside the res/drawable folder that the F.D.P of the guy who gave me the font put up, how could I change that? Remove or change the name only?

  • If this image is being used in your project, just do the refactoring normally and if any remains, change in the code as well. Now if you don’t use it, I don’t see why leave it :). Remembering that there may be a build error if you delete the image and it is being referenced in some XML or Java code.

  • I did a search for 123.png is found no reference, so I removed the image

  • So all right ;)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.