ATul Singh
ATul Singh

Reputation: 522

R.java not generating with spring and Maven

I was making an android project , with spring and maven and when there is a target folder where R.java is present But when do Maven Install it gives error that R.java not there.. I have tried all other posts , nothing is helping ,

R.java is not generating even after clean.

Upvotes: 0

Views: 389

Answers (2)

Naveed Ahmad
Naveed Ahmad

Reputation: 6737

Whenever your generated R class isn't generated, it indicates that there's a problem with generating it due to some parsing issue from the XML resources. Check the error console in your IDE to figure out what's specifically wrong.

Common problems are:

  • An unescaped character in your strings.xml, for instance you're instead of you\'re
  • Missing layout_width or layout_height tags in layout resources
  • Missing namespace declarations
  • Variable names that aren't supported by Java, for instance due to capitalization or use of spaces, hyphens or other unsupported characters
  • Any other kind of syntax error in XML
  • Check Console and Probelm Tab for the Issues

Upvotes: 0

Ricardo Gladwell
Ricardo Gladwell

Reputation: 3785

Are you developing your Android project inside Eclipse? In which case some work is needed to get the ADT to play nice with Maven/M2Eclipse. Please see my project:

https://code.google.com/a/eclipselabs.org/p/m2eclipse-android-integration/

Upvotes: 1

Related Questions