简体   繁体   English

Hello World编译错误-Android

[英]Hello World Compile Error - Android

I'm trying to setup the android dev kit, I've installed everything and tried to setup a Hello World activity, however when I build the project I get the error: 我正在尝试设置android dev工具包,我已经安装了所有内容并试图设置Hello World活动,但是在构建项目时出现错误:

Cannot run program "C:\Program Files\Java\jdk1.7.0_45\bin\java" (in directory "C:\Users\Matt\.IntelliJIdea13\system\compile-server"): CreateProcess error=2, The system cannot find the file specified

All of this is auto generated from my IDE, so I'm not sure what the problem can be, has anyone encountered this before? 所有这些都是从我的IDE自动生成的,所以我不确定是什么问题,以前有人遇到过吗?

First of all as said in the comment the error is that your file missing, so the first step is to see if the file is even there, if not I would reinstall your jdk (as that file should not be missing). 首先,如评论中所述,错误是您的文件丢失,因此第一步是查看文件是否均匀存在,否则请重新安装jdk(因为该文件不应丢失)。

If the file is there than it is most likely the case that the space in the directory is causing issue for some reason. 如果文件在那里,则很可能是目录中的空间由于某种原因引起了问题。 To fix this you can either manually copy your jdk to a new directory (without a space) and replace your current jdk's location with the new one. 要解决此问题,您可以手动将jdk复制到新目录(无空格),然后用新目录替换当前jdk的位置。 You could also uninstall the current java distribution and reinstall the new one in a location without spaces. 您也可以卸载当前的Java发行版,然后在没有空格的位置重新安装新的Java发行版。

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

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