2014-06-18 39 views
0

我正在使用Soot安裝apk文件。當我在運行soot.Main(甚至沒有創建我的身體轉換器)之前添加以下語句時,我得到一個regCount錯誤。 (出現在不同的APK文件不同的方法同樣的錯誤)當使用Soot安裝apk文件時,regCount錯誤

Scene.v().addBasicClass("MyScheduler"); 
    // PackManager.v().getPack("jtp").add(new Transform("jtp.myInstrumenter", new MyBodyTransformer())); 
    soot.Main.main(args); 

我得到的錯誤是:提前

Transforming android.support.v4.view.ViewConfigurationCompat$FroyoViewConfigurationVersionImpl... 
    Exception in thread "main" java.lang.RuntimeException: regCount does not match the number of arguments of the method 
     at org.jf.dexlib.Code.Format.Instruction35c.checkItem(Instruction35c.java:160) 
     at org.jf.dexlib.Code.Format.Instruction35c.<init>(Instruction35c.java:69) 
     at soot.toDex.instructions.Insn35c.getRealInsn0(Insn35c.java:96) 

感謝。

回答

0

我的問題是由我嘗試添加的班級代碼引起的。這真的是一個微妙的觀點:我使用「Long」的ArrayList,但我的一些方法是添加/刪除類型爲「long」的變量。雖然Java執行裝箱並且我沒有執行Java代碼的問題,但這種差異在中間語言中存在問題。