Android studio problem with Libs

0

I added a lib generated from a my project to get the class and have no conflict that pack only that is giving me the following error

    Error:Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    C:\Users\Guilherme\AppData\Local\Android\android-studio\sdk\build-tools\android-4.4W\dx.bat --dex --output C:\Users\Guilherme\Desktop\Projetos Spacnet\Monitoramento\app\build\intermediates\pre-dexed\debug\Mcvc-6004570bd72b87b14472e96d8846a081a1360b16.jar C:\Users\Guilherme\Desktop\Projetos Spacnet\Monitoramento\app\libs\Mcvc.jar
Error Code:
    1
Output:
    UNEXPECTED TOP-LEVEL EXCEPTION:
    com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
        at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
        at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
        at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
        at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
        at com.android.dx.command.dexer.Main.processClass(Main.java:665)
        at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
        at com.android.dx.command.dexer.Main.access$600(Main.java:78)
        at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:596)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
        at com.android.dx.command.dexer.Main.run(Main.java:230)
        at com.android.dx.command.dexer.Main.main(Main.java:199)
        at com.android.dx.command.Main.main(Main.java:103)
    ...while parsing br/com/spac/monitoramentocomvc/mensageiro/Mensageiro.class
    1 error; aborting
    
asked by anonymous 20.12.2014 / 11:15

1 answer

1

I was able to solve for those who have the same problem, it is necessary to create .jar in Java7, Java8 is giving this problem!

    
20.12.2014 / 17:48