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
Elegant Way to Read File into Byte[] Array in Java
How to Use Okhttp to Upload a File
Vertically Centering Text in HTML Table Cell in Java Jlabel
How to Programmatically Enable Gps in Android Cupcake
How to Disable Sslv3 in Android for Httpsurlconnection
How to Use CSS for Vaadin Components
Understand Arraylist Indexoutofboundsexception in Android
Find Out If Class Name Contains Certain Text
How to Allow Users to Check for the Latest App Version from Inside the App
Difference Between Getexternalfilesdir and Getexternalstoragedirectory()
Android Data Binding Using Include Tag
How to Get String Array from Arrays.Xml File
Http Get Using Android Httpurlconnection