Android模拟器崩溃:"霉素不良类文件魔法" / ClassNotFoundException的启动时?霉素、模拟器、启动时、不良

2023-09-09 21:03:57 作者:英国酒友。

我开发一款游戏在Android和我有一个问题。我有比赛全面运作我的另一台计算机上,所以我致力于该项目的SVN服务器在我的新的Windows 7 64位的电脑上使用。我检查出来对我的新电脑有颠覆性的月食。显然,我有,所以我固定的,该项目是免费的错误构建路径的一些问题。当我去到模拟器上运行Android运行2.3.3崩溃在启动时有一个ClassNotFoundException的主要活动。我把一切都在清单中正确的。照片 当我运行它,如果我刚洗干净,我得到警告说霉素不良类文件魔术(cafebabe)或版本(0033.0000)每类文件(否则我没有得到这些警告),我认为这可能是为何导致崩溃在启动时。我看着无处不在尝试不同的东西,但什么都没有。 需要注意的另一个重要的事情是,我能在我的新电脑在Eclipse中创建一个从样本的Andr​​oid项目,一切都运行完美的罚款。因此,出于某种原因SVN搞砸的事情了?感谢您的帮助,让我知道是否需要任何更多的信息。

I am developing a game in android and I have an issue. I have the game fully functioning on my other computer so I committed the project to an svn server to use on my new windows 7 64 bit computer. I checked it out on my new computer with subversive in eclipse. Obviously I had some issues with the build paths so I fixed those and the project was error free. When I go to run it on an emulator running android 2.3.3 it crashes at startup with a ClassNotFoundException for the main activity. I have everything correct in the manifest. When I run it, if I had just cleaned it, I get warnings that say Dx bad class file magic (cafebabe) or version (0033.0000) on every class file (Otherwise I dont get those warnings) and I think that might be why it is crashing at startup. I've looked everywhere and tried different things 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 ran perfectly fine. So for some reason svn screwed things up? Thanks for the help, let me know if any more info is needed.

编辑:忘了提,我有另外一个项目是在SVN,我使用作为一个框架和游戏引用该项目。也许他们正在编制不同版本的Java?

Forgot to mention that I have another project that was in svn that I am using as a framework and the game references that project. Maybe they are compiling as different java versions?

推荐答案

想通了感谢的意见被留下的!其他框架的项目,我不得不用我的游戏项目中引用就像我在编辑提及。事实证明,在该框架SDK水平是1.6 1.7而不是像它应该是,即使本场比赛的项目为1.6。出于某种原因,机器人没有发现这一点,它把一切不正常的。之后,我每一个项目变更为1.6和清理它的工作每一个项目!谢谢!

Figured it out thanks to comments that were left! The other framework project I had was referenced by my game project like I mentioned in the edit. It turns out that the sdk level on that framework was 1.7 instead of the 1.6 like it should have been even though the game project was 1.6. For some reason android didn't detect that and it threw everything out of whack. After I changed every project to 1.6 and cleaned every project it worked! Thanks!