你可以说:-keepclassmembers class sun.** { public protected *; } 但是我不排除包/默认访问方法:(void myMethod { } 最佳答案 您可以像这样添加另一个-keepclassmembers:-keepclassmembers class com.mycompany.MyClass { !public !protected !private *; }