java.lang.annotation 无法解析

问题描述

我最近在 Eclipse 中更改了一个项目的包,这样做似乎导致构建路径出现问题。

我有一个名为 PlaceholderDocumentation 的注释,见下图

@H_502_5@package com.projectjhs.forum.api.placeholders;

import static java.lang.annotation.ElementType.TYPE;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Documented
@Target(TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface PlaceholderDocumentation {
    String name();

    String description();
}

导入 @H_502_5@import static java.lang.annotation.ElementType.TYPE 给了我错误 @H_502_5@The import java.lang.annotation.ElementType cannot be resolved。我在问题列表中也有一个错误内容

@H_502_5@The project was not built since its build path is incomplete. Cannot find the class file for java.lang.annotation.ElementType. Fix the build path then try building this project

我在其他任何地方都找不到与此问题相关的任何内容

感谢您阅读本文。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)