Dx Bad Class File Magic (Cafebabe) or Version (0033.0000) with Adk14

Dx bad class file magic (cafebabe) or version (0033.0000) with ADK14

I found the solution to this problem at last.

If you look in Proguard.bat (Android SDK\tools\proguard\bin), you will find the following line:

call %java_exe% -jar "%PROGUARD_HOME%"\lib\proguard.jar %*

Replace it with the following:

call %java_exe% -jar "%PROGUARD_HOME%"\lib\proguard.jar %1 %2 %3 %4 %5 %6 %7 %8 %9

It's a stupid old issue, that I actually realize that I have seen before, now that I have figured it out. Apparently the Android SDK team still haven't fixed this problem, and it was reintroduced when I did a clean install of the Android SDK.

Bad class file magic on dx.bat

Well i found the solution here:
http://www.informit.com/articles/article.aspx?p=1966023

I used the following arguments on my javac command, So the generated class files are suitable for Dx command,

javac -source 1.6 -target 1.6 ca/tutortutor/utils/Utils.java

Bad class file magic when using dx.bat

Your classes need to be compiled with jdk 5 or 6. You are probably using 7. If that doesn't work, you might also need to make sure that every single class is compiled right, even if in different projects. Solved my problem here.

bad class cafebabe or version 0034

Even though the class was compiled with Java 7 and the command javap -verbose said so, when I opened the .class file in Android Studio, it showed Decompiled .class file, bytecode version: 52.0 (Java 8) on the top of the screen.

In the end, deleting and compiling the jar again did the trick.

Dexifying a jar file compiled by JDK 6 gives bad class file magic error

I created a totally new project (after changing my eclipse compiler to JDK 1.6). Then, the dexifying worked OK.

UNEXPECTED TOP-LEVEL EXCEPTION Error when building with Android and Libgdx

Alright. I figured this out by looking at the file that was being parsed "com/badlogic/gdx/graphics/g2d/Batch.class" and assuming that the problem had something to do with a library attached to my libgdx project. I made a new libgdx project and moved over all of the files from my old project to the new one. Things are working fine now and the project builds correctly. Hopefully this helps somebody out in the future.



Related Topics



Leave a reply



Submit