Marcos Vasconcelos
Marcos Vasconcelos

Reputation: 18276

Conflict on generated R

I has some Android projects that I'm integrating on one.

This is something like:

(Lib projects) Android_Commons RichReader FacReader WWReader

The main project is ReaderShelf, and add all those projects as library on it's path.

But the source linked presents compilation errors, the ids from the library cannot be found on the R class.

I opened all the R files, and they are a merge of all the original R files.

But when opening from the source that give error:

    searchButton = (Button) findViewById(R.id.r_search);
    sectionsButton = (Button) findViewById(R.id.r_sections);
    navigateButton = (Button) findViewById(R.id.r_navigate);

They open the correct file but without the r_sections & r_navigate.

PS: r_search that don't give error is a common id that is presented on the Main project as well

Actually, I found another weird behavior, commenting the problematic lines, the code compiles, but when opening, the DPReaderActivity returns null on all findViewById.

Edit: I saw the log building the project and I found this, I don't know if it helps

[2011-09-26 18:36:21 - ReaderShelf] trying overlaySet Key=r_favorites.png
[2011-09-26 18:36:21 - ReaderShelf] trying overlaySet Key=r_library.png
[2011-09-26 18:36:21 - ReaderShelf] trying overlaySet Key=r_navigate.png
[2011-09-26 18:36:21 - ReaderShelf] trying overlaySet Key=r_search.png
[2011-09-26 18:36:21 - ReaderShelf] trying overlaySet Key=r_sections.png

Upvotes: 0

Views: 478

Answers (1)

Mel
Mel

Reputation: 6284

Check the import list, there might be an import with an outdated package name or with "R" in the name.

Upvotes: 2

Related Questions