Proguard处理接口将删除接口方法抛出

问题描述 投票:0回答:1

当我在Android上使用proguard时,我在处理界面后发现了proguard,删除了throws的界面方法。

之前:

public interface Factory {

Card create(Profile profile) throws CardException;

}

pro guard-rules.pro:

-keep interface Factory { *; }

后:

public interface Factory {
Card create(Profile var1);
}

您可以看到方法的抛出被删除。

我不知道优化,混淆或缩小原因的原因。

java android proguard android-proguard
1个回答
0
投票

com.example类的基础包替换CardException并将此行放在proguard文件中

-keep class com.example.** { *; }
© www.soinside.com 2019 - 2024. All rights reserved.