RetentionPolicy/ ElementType cannot be resolved to a variable
2018-02-07 11:13
399 查看
这是很久之前遇到的一个问题。
当时是在自定义注解,在定义
解决办法(手动导入类路径):
当时是在自定义注解,在定义
@Target(value=ElementType.FIELD)和
@Retention (value=RetentionPolicy.RUNTIME)类时报错。
解决办法(手动导入类路径):
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.ElementType;
相关文章推荐
- Java_注解_异常_01_ElementType cannot be resolved to a variable
- * cannot be resolved to a type/variable
- Cookie Cannot be resolved to a type
- 解决使用Maven,代码正确却发生大量类文件cannot be resolved to a type的情况
- 遇到的问题---String cannot be resolved to a type
- "XX cannot be resolved to a type "eclipse报错及解决
- Description Resource Path Location Type AppliToolingPart cannot be resolved to a type AppliToolingPa
- HttpServlet cannot be resolved to a type解决办法
- (转)eclipse报错及解决说明 "XX cannot be resolved to a type "
- Enumeration cannot be resolved to a variable
- r cannot be resolved to a variable 问题解决 / r.java文件没有自动生成
- android之R cannot be resolved to a variable
- RESULT_OK cannot be resolved to a variable
- 关于class cannot be resolved to a type的问题
- Httpservlet cannot be resolved to a type的原因与解决方法
- javax.servlet.jsp.PageContext cannot be resolved to a type
- javax.servlet.jsp cannot be resolved to a type
- cannot be resolved to a type的解决方案
- Eclipse javax.servlet.jsp.PageContext cannot be resolved to a type 错误玄学解决办法
- Eclipse新建工程编译R cannot be resolved to a variable问题