简体   繁体   English

Android新手安装Eclipse,出现问题

[英]Android newbie installing Eclipse, having issues

I am a web developer, new to app development and Java/Android. 我是一名Web开发人员,不熟悉应用程序开发和Java / Android。 I am about to follow some tutorials to get started learning but I'm running into a wall. 我将要遵循一些教程以开始学习,但是我遇到了麻烦。 The Android dev site says the recommended way to build Android apps is in Java using the Eclipse plug in. So I downloaded Eclipse Classic and unzipped it on to get this error: Android开发人员站点表示,推荐的构建Android应用程序的方法是使用Eclipse插件使用Java。因此,我下载了Eclipse Classic,并解压缩了该错误:

"A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. “必须有Java Runtime Environment(JRE)或Java Development Kit(JDK)才能运行Eclipse。

No Java virtual machine was found after searching the following locations: /Users//Desktop/eclipse/Eclipse.app/Contents/MacOS/jre/bin/java java in your current PATH" 搜索以下位置后未找到Java虚拟机:/Users//Desktop/eclipse/Eclipse.app/Contents/MacOS/jre/bin/java java in your PATH“

Any idea what the issue is and how I can fix it? 知道这个问题是什么以及如何解决? Again, newbie to java, jre, android, so I apologize if this question has already been asked. 同样,对于Java,Jre,Android是新手,因此,如果这个问题已经被提出,我深表歉意。 In my research I've discovered that most of the posts or solutions I've found are tough for me to follow. 在我的研究中,我发现我发现的大多数帖子或解决方案对我来说都很困难。 There's always a few unclear items that are probably prohibiting me from getting the answer I need. 总有一些不清楚的项目可能会阻止我获得所需的答案。 So I'm hoping someone can walk me through installing or configuring whatever I need to regarding Java so I can continue installing Eclipse and begin learning. 因此,我希望有人可以指导我完成有关Java的安装或配置工作,以便我可以继续安装Eclipse并开始学习。

I should probably note that I'm on Mac OSX 10.6.6 Snow Leopard. 我可能应该注意,我在Mac OSX 10.6.6 Snow Leopard上。 Please let me know if you need any other info. 如果您需要其他任何信息,请告诉我。 Thanks so much in advance for any and all help!!! 提前非常感谢您提供的所有帮助!!!

Your Mac is telling the truth, it can't find a JRE or JDK - make sure one is in your PATH and then try again. 您的Mac正在说实话,它找不到JRE或JDK-确保其中一个在您的PATH中,然后重试。

[edit] [编辑]

At the command prompt: 在命令提示符处:

whereis java 

and got /usr/bin/java. 并获得了/ usr / bin / java。

ls -l /usr/bin/java

showed a symlink to /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java. 显示了到/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java的符号链接。

cd /System/Library/Frameworks/JavaVM.framework/Versions/

indicates that all my java's are located here. 表示我所有的Java都位于此处。

So, as long as /usr/bin/java exists, it should be linked to your current jdk. 因此,只要/ usr / bin / java存在,它就应该链接到当前的jdk。 If it's not, you're probably going to have to do a little googling to find out why. 如果不是这样,您可能必须进行一些谷歌搜索以找出原因。

Apple contends that all the java stuff is ready to go on your machine (as it was on mine). 苹果公司认为所有Java东西都可以在您的机器上运行了(就像在我的机器上一样)。 See here for more information. 有关更多信息,请参见此处

[/edit] [/编辑]

从Oracle下载Java jdk。

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

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