bad class file magic (cafebabe) or version (0034.0000)
powder366 opened this issue · 6 comments
I get the following error under Android Studio with your jar file.
uses-sdk android:minSdkVersion="9" android:targetSdkVersion="10"
Tried Java 1.6 and 1.7
rollbar-android-0.1.1.jar
Error:Execution failed for task ':Timesheet:dexFreeRelease'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Users//android/sdk/build-tools/19.1.0/dx --dex --output /Users/code/studio/Timesheet/Timesheet/build/intermediates/dex/free/release /Users/code/studio/Timesheet/Timesheet/build/intermediates/classes-proguard/free/release/classes.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 com/b/a/b.class
1 error; aborting
Here's a JAR built with Java 1.6. Let me know if that works for you and
I'll update the release on Github.
Cory Virok, @coryvirok http://twitter.com/coryvirok
Co-founder and CTO, Rollbar http://rollbar.com/
On Thu, Jan 8, 2015 at 1:46 PM, powder366 notifications@github.com wrote:
I get the following error under Android Studio with your jar file.
Tried Java 1.6 and 1.7
rollbar-android-0.1.1.jar
Error:Execution failed for task ':Timesheet:dexFreeRelease'.
com.android.ide.common.internal.LoggedErrorException: Failed to run
command:
/Users//android/sdk/build-tools/19.1.0/dx --dex --output
/Users/jonasheyman/code/studio/Timesheet/Timesheet/build/intermediates/dex/free/release
/Users/jonasheyman/code/studio/Timesheet/Timesheet/build/intermediates/classes-proguard/free/release/classes.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 com/b/a/b.class
1 error; aborting—
Reply to this email directly or view it on GitHub
#16.
Did not get a jar... could you attach it here?
Looks like Github filters out JAR files and doesn't allow you to attach them here. @powder366 I've emailed the JAR files to you.
Can I have them too please?
I've updated the release download files to be built using Java 6. I was waiting for confirmation from @powder366 or @VinothiniBalakrishnan that they worked but haven't heard back. Please let me know if this solves your problem.
Thanks!
https://github.com/rollbar/rollbar-android/releases/tag/v0.1.1
@coryvirok I'm getting same error but I'm using command line to generate classes.dex file but I'm getting this same error. I couldn't understand your above answer. can you kindly let me know how to fix this.
I'm using this command
dx
--dex
--verbose
--output=C:\Users\Muzammil-Husnain\testing\Soothing-snow-fall\bin\classes.dex
C:\Users\Muzammil-Husnain\testing\Soothing-snow-fall\bin\classes
C:\Users\Muzammil-Husnain\testing\Soothing-snow-fall\bin\dexedLibs