更多日食的疯狂。错误的JDK设置在引进项目 [英] More eclipse insanity. Wrong JDK is set on imported projects

查看:191
本文介绍了更多日食的疯狂。错误的JDK设置在引进项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许它只是我,但几乎每次我导入Android项目它不编译。首先,我需要设置Android SDK中。那是合理的。但后来,我几乎总是需要重新设置JDK。通常从JDK 1.4到JDK 1.6。现在,我真的不认为有太多的人在那里发展与JDK 1.4 Android系统。也许是这样,但它没有在我的机器上,但其经常美元,每个Android项目我输入P $ P-选择。它的一个恼人的额外的步骤,我无法想象X $ C $ç做这样的事情。有谁知道为什么Eclipse的做到这一点?

Maybe its just me but almost everytime I import an Android project it does not compile. First I need to set the Android SDK. Thats reasonable. But then, I almost always need to reset the JDK. Usually from JDK 1.4 to JDK 1.6. Now I really don't think too many people are out there developing android with JDK 1.4. Perhaps they are, but its no where on my machine, and yet its often pre-selected on every Android project I import. Its an annoying extra step, and I cannot imagine xCode doing something like this. Does anyone know why Eclipse does this?

现在有些项目是不是最新的。但是,是什么让我觉得这是一个eclipse的问题是,往往错误的是,它不会编译,因为它不是1.6版本,这意味着它必须被开发的JDK 1.6。它通常是一个错误,涉及我看到的说,它不能没有JDK 1.5或1.6以上版本使用@Override。然后,我检查JDK设置项目,果然在它的JDK 1.4。决不1.5,决不1.3。

Now some of these projects are not the most recent. But what makes me think this is an eclipse issue is that often the error is that it won't compile because its not version 1.6 Which means that it must have been developed with the JDK 1.6. Its usually an error involving @Override that I see saying it can't be used without JDK 1.5 or 1.6+. I then check the JDK setting for the project and sure enough its at JDK 1.4. Never 1.5, Never 1.3.

推荐答案

设置项目的JRE到执行环境。这是额外的间接层,让你从你的工作空间特别通过其名称引用JRE,有助于使项目更容易分享。

Set the project's JRE to an Execution Environment. It's an extra layer of indirection that keeps you from referencing a JRE by its name in your particular workspace, helping make the project more easily shared.

这篇关于更多日食的疯狂。错误的JDK设置在引进项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆