R.java The type R is already defined

简介: DOWNLOAD的工程项目,往往容易出现:R.java文件”The type R is already defined” 原因是SRC目录和GEN目录同时存在R.java文件。

DOWNLOAD的工程项目,往往容易出现:R.java文件”The type R is already defined”

image

原因是SRC目录和GEN目录同时存在R.java文件。

因此,需要将SRC目录的R.java文件删除,再刷新gen目录。

 

image

 

image

 

参考文献:

http://bbs.csdn.net/topics/340248934

http://bbs.csdn.net/topics/350161951?page=1

相关文章
|
5月前
|
IDE Java 编译器
Java The method compareTo(Integer) in the type解决方法
Java编程过程中,Integer对象(或其它继承自Number类的包装类对象)使用Number包装类内置的compareTo()方法来比较调用对象和参数之间的大小的时候,Java的集成开发环境IDE或编译器给出了提示:The method compareTo(Integer) in the type Integer is not applicable for the arguments (Float)
54 5
|
1月前
|
JSON Java 数据格式
java调用服务报错415 Content type ‘application/octet-stream‘ not supported
java调用服务报错415 Content type ‘application/octet-stream‘ not supported
66 1
|
1月前
|
Java API Nacos
Caused by: java.lang.IllegalStateException: No Feign Client for loadBalancing defined. Did you forge
Caused by: java.lang.IllegalStateException: No Feign Client for loadBalancing defined. Did you forge
java.lang.Error: Unresolved compilation problem: The type List is not generic; it cannot be parame
java.lang.Error: Unresolved compilation problem: The type List is not generic; it cannot be parame
|
3月前
|
存储 Java Maven
Maven依赖全爆红,一刷新就JAVA_HOME environment variable is not defined correctlyThis environment variable is
Maven依赖全爆红,一刷新就JAVA_HOME environment variable is not defined correctlyThis environment variable is
|
3月前
|
Java Maven
The JAVA_HOME environment variable is not defined correctly,this environment variable is needed to
The JAVA_HOME environment variable is not defined correctly,this environment variable is needed to
|
4月前
|
Java
springboot 异常java.net.BindException: Address already in use: bind
springboot 异常java.net.BindException: Address already in use: bind
46 0
|
4月前
|
Java Maven
【已解决】MAC安装maven,The JAVA_HOME environment variable is not defined correctly, this environment
【已解决】MAC安装maven,The JAVA_HOME environment variable is not defined correctly, this environment
200 0
|
4月前
|
Java 应用服务中间件
已解决:An error occurred at line: 1 in the generated java file The type java.io.ObjectInputStream canno
已解决:An error occurred at line: 1 in the generated java file The type java.io.ObjectInputStream canno
93 0
|
5月前
|
Java 程序员
Java中的强制类型转换(Explicit Type Casting)
Java中的强制类型转换(Explicit Type Casting)
120 0