All, I have an external JAR that I'm adding to my Android project. However, as my jar is consistently updating and changing. When I update my JAR, I get the dalvik VM magic number error.
I don't understand how I'm supposed to fix this?
Here's the steps I've followed.
<strong>Adding The Jar Initially</strong><ol><li>Copy JAR to
libsfolder in my project</li> <li>Run project</li> </ol>
My JAR is picked up, installed everyone is happy.
<strong>Updating the Jar</strong><ol><li>In Eclipse, go to the jar in
libsand right click -> delete.</li> <li>Copy my new jar (same name) into the
bad class file magicerror.</li> </ol>
<strong>My Troubleshooting So Far</strong><ol><li>In eclipse,
Project -> Clean...</li> <li>Select my project, clean it.</li> <li>Run it. Same error... magic number</li> <li>Project Properties -> Java Build Path -> Remove
Android Private Libraries</li> </ol>
Now the private libraries aren't being re-added. (Which equates to missing imports in my Java project) Why is this a nightmare? Any suggestions?Answer1:
Turns out that my issue was caused by the multiple JDK's I had. Android was defaulting to use JDK 1.7 while my console jar was using JDK 1.8