ohio813 / smali

Automatically exported from code.google.com/p/smali
0 stars 0 forks source link

Writing out a dex file throws an item not found exception #169

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What seems to be the problem?
code:

public static void main(String[] args) {
        try { 
            DexBackedDexFile dexFile = DexFileFactory.loadDexFile(dexFileName, apiLevel);  
            DexPool dexPool = DexPool.makeDexPool(); 
            dexPool.writeTo("/tmp/out.dex", dexFile);            
        } catch (IOException ex) { 
            System.out.println("Exception: " + ex); 
        } 
}

Exception in thread "main" org.jf.util.ExceptionWithContext: Item not found.: []
        at org.jf.dexlib2.writer.pool.BaseOffsetPool.getItemOffset(BaseOffsetPool.java:52)
        at org.jf.dexlib2.writer.DexWriter.writeAnnotationSetRefs(DexWriter.java:612)    
        at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:208)
        at org.jf.dexlib2.writer.pool.DexPool.writeTo(DexPool.java:88)
        at Instrumentation.main

What is the exact smali/baksmali command that you ran?

dexlib2

What version of smali/baksmali are you using? What rom are you working
from?

What is the airspeed velocity of an unladen swallow?

Please provide any additional information below: error messages, symptoms,
etc.

Original issue reported on code.google.com by contacts...@gmail.com on 29 May 2013 at 10:25

GoogleCodeExporter commented 9 years ago
If you can provide the classes.dex you were using, that would be helpful. But 
if not, that's understandable :)

Original comment by jesusfreke@jesusfreke.com on 30 May 2013 at 12:24

GoogleCodeExporter commented 9 years ago
This should be fixed by 
https://code.google.com/p/smali/source/detail?r=2973f7a4afe08520a15d89459419151d
6e39ed9e

Original comment by jesusfreke@jesusfreke.com on 1 Jun 2013 at 8:54