解决方式 1.手动导入包 import java.lang.annotation.RetentionPolicy; import java.lang.annotation.ElementType; 原文 http://www.codingwhy.com/view/851.html