5
我原來的代碼是:行爲異常,同時使用ProGuard
private String hello;
private int i = 0;
public void test() {
if (i == 0) {
hello = "asdas";
} else {
hello = "asasvfasfas";
}
}
使用ProGuard模糊處理後:
private String a;
private int c = 0;
public void a()
{
if (this.c == 0);
for (this.a = "asdas"; ; this.a = "asasvfasfas")
return;
}
在項目屬性:
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
我proguard的-project.txt文件是空的,所以我想它應該使用默認的配置文件:proguard-android.txt。
爲什麼它的行爲如此呢?我怎樣才能防止這種代碼優化?請幫忙。
那些'this.a'或'this.c'? –
@RohitJain:它的this.a本身...請找到更新的代碼。 –
@EldhoseMBabu也許我在這裏錯過了一些東西,但是它不是在做它應該做的事情嗎? – Navin