-1

I have a library project A: package com.a

And I have another project B: package com.b

In project B, I use com.a.R.xxx. <== It is OK.

But when I set project B is library project, Eclipse said

"com.a.R.xxx cannot be resolved to a variable".

I don't understand why Eclipse cannot find com.a.R if B is a library project. Can anyone help me?

Unheilig
  • 16,196
  • 193
  • 68
  • 98
merrymenvn
  • 878
  • 7
  • 12

1 Answers1

0

This is a common bug. Possible solutions include:

  • Clean projects and rebuild

  • There is an error in an xml file (or that specific one) that is preventing the file from being loaded properly

  • Android Developer tools are out of date. Run an update in the SDK manager and eclipse plugin

Shmuel
  • 3,916
  • 2
  • 27
  • 45
  • 1. Of course, I clean and rebuild many times before asking here. 2. There is no error in any xml file. I'm sure because this error only happends when I set B is library project. 3. Ok, I will update everything (although I've just downloaded new ADT few days ago). – merrymenvn Mar 10 '14 at 19:06