【发布时间】:2026-01-13 16:30:01
【问题描述】:
我的 Andoid Studio(3.5 版本)有问题。当我写一个类时,像这样:
public class ExampleEnum
{
@Retention ( RetentionPolicy.SOURCE )
@IntDef (
{
A, B, C, D, E, F
} )
public @interface Numbers
{
int A = 0;
int B = 1;
int C = 2;
int D = 3;
int E = 4;
int F = 5;
}
如果我尝试运行我的应用程序,我总是会收到相同的错误:error: cannot find symbol class Retention and 和 error: cannot find symbol class IntDef
谁能帮助我?谢谢。
【问题讨论】:
-
分享你的 gradle 文件。