Android emulator crashes: "Dx bad class file magic" / ClassNotFoundException on startup?

I am developing a game on android and I have a problem. I have a game that works completely on my other computer, so I transferred the project to the svn server for use on my new 64-bit Windows 7. I tested this on my new computer with a disruptive effect in the eclipse. Obviously, I had some problems with assembly lines, so I fixed them and the project was error free. When I go to run it on an emulator running Android 2.3.3, it fails to start with a ClassNotFoundException for the main action. I have everything right in the manifest.
When I run it, if I just cleared it, I get warnings that tell Dx bad class file magic (cafebabe) or version (0033.0000) about every class file (otherwise I do not get these warnings), and I think that this may be causing a startup failure. I searched and tried different things everywhere, but nothing.
Another important thing to note is that I was able to create an android project from a sample in eclipse on my new computer, and everything went fine. So for some reason svn screwed up? Thanks for the help, let me know if you need more information.

EDIT: Forgot to mention that I have another project that was in svn, which I use as a framework, and links to the games that this project has. Maybe they compile as different versions of Java?

+4
source share
1 answer

I found out thanks to the comments that remained! In another framework project that I referenced, my game project referenced, as I mentioned in the editing. It turns out that the sdk level in this structure was 1.7 instead of 1.6, as it should be, although the game project was 1.6. For some reason, the android did not detect this, and it threw everything out of the air. After I changed each project to 1.6 and cleared each project, it will work! Thanks!

+3
source

Source: https://habr.com/ru/post/1386759/


All Articles