proguard:找不到引用的字段' java.lang.Boolean default'

时间:2017-02-04 04:27:02

标签: reference field proguard

interface Foo {

    Boolean getDefault();
}


class FooImpl implements Foo {

   private Boolean defaultValue;

   @Override
   public Boolean getDefault() {
      return defaultValue;
   }
}

Proguard:找不到引用字段' java.lang.Boolean default'在课堂上FooImpl。怎么了?

1 个答案:

答案 0 :(得分:0)

确保使用像这样的proguard属性文件

-injars in_name_of_ajr.jar
-outjars out_jar.jar
-printmapping mappingfile_name.map
**-libraryjars  <java.home>/lib/rt.jar**  // this is solution for ur question 
-libraryjars  .. any other jar location if you user them as libs in your project

-target 1.7 // java version
-keep public class your_package_name.MainClass { 
      public static void main(java.lang.String[]); 
}