R.java 未使用 spring 和 Maven 生成

发布于 2024-11-16 07:05:11 字数 157 浏览 6 评论 0原文

我正在使用 spring 和 maven 制作一个 android 项目,并且存在一个存在 R.java 的目标文件夹 但是当 Maven Install 时,它会给出 R.java 不存在的错误。 我已经尝试了所有其他帖子,没有任何帮助,

即使在清理后,R.java 也不会生成。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

热风软妹 2024-11-23 07:05:11

您正在 Eclipse 中开发 Android 项目吗?在这种情况下,需要做一些工作才能使 ADT 与 Maven/M2Eclipse 良好配合。请参阅我的项目:

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

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/

你穿错了嫁妆 2024-11-23 07:05:11

只要未生成生成的 R 类,就表明由于 XML 资源的某些解析问题,生成它时出现问题。检查 IDE 中的错误控制台以找出具体错误所在。

常见问题有:

  • strings.xml 中存在未转义字符,例如 youre 而不是 you\'re
  • 缺少 layout_width布局资源中的layout_height 标签
  • 缺少名称空间声明
  • Java 不支持的变量名称,例如由于大写或使用空格、连字符或其他不支持的字符
  • 任何其他类型的语法错误于XML
  • 检查问题的控制台问题选项卡

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文