sky201503 / android-apktool-1

Automatically exported from code.google.com/p/android-apktool
0 stars 0 forks source link

method index is too large. #358

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I: Smaling...
Exception in thread "main" org.jf.dexlib.Util.ExceptionWithContext: method 
index is too large.
    at org.jf.dexlib.Util.ExceptionWithContext.withContext(ExceptionWithContext.java:54)
    at org.jf.dexlib.Item.addExceptionContext(Item.java:177)
    at org.jf.dexlib.Item.writeTo(Item.java:120)
    at org.jf.dexlib.Section.writeTo(Section.java:119)
    at org.jf.dexlib.DexFile.writeTo(DexFile.java:716)
    at brut.androlib.src.DexFileBuilder.getAsByteArray(DexFileBuilder.java:75)
    at brut.androlib.src.DexFileBuilder.writeTo(DexFileBuilder.java:58)
    at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:50)
    at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
    at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:243)
    at brut.androlib.Androlib.buildSources(Androlib.java:200)
    at brut.androlib.Androlib.build(Androlib.java:191)
    at brut.androlib.Androlib.build(Androlib.java:174)
    at brut.apktool.Main.cmdBuild(Main.java:188)
    at brut.apktool.Main.main(Main.java:70)
Caused by: java.lang.RuntimeException: method index is too large.
    at org.jf.dexlib.Code.Format.Instruction35c.writeInstruction(Instruction35c.java:102)
    at org.jf.dexlib.Code.Instruction.write(Instruction.java:57)
    at org.jf.dexlib.CodeItem.writeItem(CodeItem.java:258)
    at org.jf.dexlib.Item.writeTo(Item.java:117)
    ... 12 more
code_item @0xe5648 
(Laa;-><init>(Lcom/google/protobuf/Descriptors$FieldDescriptor;Ljava/lang/String
;Ljava/lang/Class;Ljava/lang/Class;)V)

Original issue reported on code.google.com by hank....@gmail.com on 26 Nov 2012 at 4:17

GoogleCodeExporter commented 9 years ago
Attach the apk?

Original comment by connor.tumbleson on 26 Nov 2012 at 12:58

GoogleCodeExporter commented 9 years ago
That's not an error, its a limitation of android to 65535 methods per 
classes.dex. Hence why some manufactures use framework2, secondary_framework 
etc.

Original comment by lennyk...@gmail.com on 8 Dec 2012 at 10:54

GoogleCodeExporter commented 9 years ago
As lenny said.

Try using Proguard or something to cut down on the dependencies on your APK.

Original comment by connor.tumbleson on 13 Dec 2012 at 1:15