1.创建存放常量的java文件 public final class Constants{ public static final String XXX_KEY="XXX"; } 调用Constants.XXX_KEY