From cb0cfbee84d270f7e1d7408d10d540691d9f710b Mon Sep 17 00:00:00 2001 From: dqzg12300 Date: Wed, 10 Jan 2024 11:28:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/android/dx/merge/DexMerger.java | 7 ++++++- src/com/android/dx/unpacker/MethodCodeItemFile.java | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/com/android/dx/merge/DexMerger.java b/src/com/android/dx/merge/DexMerger.java index 6d57439..deebcdc 100644 --- a/src/com/android/dx/merge/DexMerger.java +++ b/src/com/android/dx/merge/DexMerger.java @@ -889,7 +889,12 @@ private void transformMethods(Dex in, IndexMap indexMap, ClassData.Method[] meth } else { codeOut.alignToFourBytesWithZeroFill(); classDataOut.writeUleb128(codeOut.getPosition()); - transformCode(in, in.readCode(method), indexMap); + try{ + transformCode(in, in.readCode(method), indexMap); + }catch (Exception ex){ + System.out.println("tracesformCode Exception "+ex.getMessage()); + } + } } else { diff --git a/src/com/android/dx/unpacker/MethodCodeItemFile.java b/src/com/android/dx/unpacker/MethodCodeItemFile.java index 12254b6..7f29ff4 100644 --- a/src/com/android/dx/unpacker/MethodCodeItemFile.java +++ b/src/com/android/dx/unpacker/MethodCodeItemFile.java @@ -30,6 +30,9 @@ public MethodCodeItemFile(File file) this.map = new HashMap<>(); Gson gson=new Gson(); String[] items=this.jsondata.split(";"); + if(items.length<=2){ + items=this.jsondata.split("\n"); + } for(int i=0;i