質問

I am tryig to dexify a jar file using the following command:

dx --dex --output=classes.dex JAR_file.jar

This gives me the following errors:

    trouble processing:
    bad class file magic (cafebabe) or version (0033.0000)
    .....................etc

When I searched, I found that they are the same errors that appear in this question

Yes, I was compiling my project with JDK 1.7. So I downloaded JDK 1.6, and changed the setting of my eclipse to make it use JDK 1.6.

I did that by: Window->Preferences->Compiler and then I set the compiler compilance level to 1.6. Finally, I configured the compiler to make it use JRE6 that I downloaded. I clicked OK. I tried to run my project again, and generated the jar file.

When I run the command again for dexifying that jar file. It still shows the same errors. What am I missing?

Note: The jar file is a bundle that I created in my eclipse as a "Plugin" project. Here is a snapshot of the project:

enter image description here

In the question I am referring to, the accepted answer says if you still have the same problem, then you have to make sure that every single class is compiled right. What does that mean? I tried to compile again and again, but I am still getting the same errors.

役に立ちましたか?

解決 2

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

他のヒント

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

Mentioned here

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top