简体   繁体   English

Android Dependencies注解.jar使项目崩溃

[英]Android Dependencies annotations.jar crashes project

I have an Android API 10 project which was running fine until I upgraded to Eclipse Kepler from Juno. 我有一个Android API 10项目,在从Juno升级到Eclipse Kepler之前,它运行良好。 Now, when I try to run it, I get these errors: 现在,当我尝试运行它时,出现以下错误:

• [2013-11-27 16:39:42 - RoboSkorz] Dx trouble writing output: already prepared •[2013-11-27 16:39:42-RoboSkorz] Dx麻烦写输出:已经准备好

• [2013-11-27 16:39:42 - Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. •[2013-11-27 16:39:42-Dex Loader]无法执行dex:java.nio.BufferOverflowException。 Check the Eclipse log for stack trace. 检查Eclipse日志中的堆栈跟踪。

• [2013-11-27 16:39:42 - RoboSkorz] Conversion to Dalvik format failed: Unable to execute dex:java.nio.BufferOverflowException. •[2013-11-27 16:39:42-RoboSkorz]转换为Dalvik格式失败:无法执行dex:java.nio.BufferOverflowException。 Check the Eclipse log for stack trace. 检查Eclipse日志中的堆栈跟踪。

I did a clean install of the latest Eclipse Kepler, Android SDK and the Eclipse ADT plugin. 我干净安装了最新的Eclipse Kepler,Android SDK和Eclipse ADT插件。 No help. 没有帮助

Eclipse adds the annotations.jar in Android Dependencies folder. Eclipse在Android Dependencies文件夹中添加了批注。 If I remove the jar from the build path, the project builds and runs OK. 如果我从构建路径中删除jar,则项目将构建并运行OK。 But, when I exit and re-start Eclipse, it adds the jar back, and the project fails to run again. 但是,当我退出并重新启动Eclipse时,它又将jar添加回去,并且该项目无法再次运行。

Is the annotations.jar needed for API 10? API 10是否需要注解.jar? If not, how can I get rid of it? 如果没有,我该如何摆脱呢?

I have fixed the problem which caused the annotations.jar to crash my program, but I'm not sure exactly which change did the trick. 我已经解决了导致批注.jar崩溃的问题,但是我不确定到底是哪个更改成功了。

It seemed like the problem resulted from some version incompatibility between the annotations.jar, and other things in the project. 似乎该问题是由于批注和项目中其他内容之间的某些版本不兼容引起的。 I uninstalled both Eclipse and the Android SDK. 我同时卸载了Eclipse和Android SDK。 I re-installed the SDK in a new folder with no spaces in its name and no previous security restrictions (c:\\programs). 我将SDK重新安装在一个新文件夹中,该文件夹的名称中没有空格,并且以前没有安全限制(c:\\ programs)。 I ran the Android SDK Manager and added components and APIs I needed. 我运行了Android SDK Manager,并添加了所需的组件和API。 I re-installed Eclipse in the same folder. 我在同一文件夹中重新安装了Eclipse。 I installed the Android plugin in Eclipse. 我在Eclipse中安装了Android插件。

It worked. 有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM