user3514625
user3514625

Reputation: 21

R cannot be resolved issues in my android project

I already cleaned the project , and set the automatic build after clean it up

but there are 50 errors regarding the 'R cannot be resolved to a variable'

how to fix this issues ? i really confused ...

Thanks before

Upvotes: 0

Views: 49

Answers (2)

nakco
nakco

Reputation: 13

I've had problems like that before, while importing a project to my workspace, I don't know if that's your case, but this answer helped me in those cases:

Android Eclipse - moving project caused all R reference errors

Upvotes: 0

nKn
nKn

Reputation: 13761

This error is usually caused by either of these possibilities:

  • The most probable: You have a syntax error in any of your layout files (i.e., the files located under the res\layout folder of your project). The bad thing of this is that Eclipse won't warn you and tell you what's the error, so you'll have to go one by one looking for the syntax (probably an unmatched tag, an unmatched attribute, etc.) and fix the issue.

  • The other possibility is a syntax error within your AndroidManifest.xml file. Same goes here, check it for syntax errors.

One of these two will fix your issue.

Upvotes: 2

Related Questions