Eclipse 升级不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9617830/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse Upgrade Not Working
提问by taraloca
My Eclipse out of the blue stopped building my Android so I removed the old version and have installed Indigo. When I try to import an Android project in I get this error:
我的 Eclipse 突然停止构建我的 Android,所以我删除了旧版本并安装了 Indigo。当我尝试在其中导入 Android 项目时出现此错误:
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'ACCUWX_HoneyComb'.
java.lang.NullPointerException
Errors running builder 'Android Pre Compiler' on project 'ACCUWX_HoneyComb'.
java.lang.NullPointerException
Errors running builder 'Java Builder' on project 'ACCUWX_HoneyComb'.
java.lang.NullPointerException
Please help!
请帮忙!
回答by jjNford
Try removing the .metadata folder from your workspace. This holds all your configurations, even after a new install. I think if you just delete this folder, assuming everything is in place, you should be up and running again.
尝试从您的工作区中删除 .metadata 文件夹。即使在新安装之后,这也会保存您的所有配置。我想如果你只是删除这个文件夹,假设一切都到位,你应该重新启动并运行。
回答by Mick Byrne
The 21.0.1 version of the Eclipse ADT tools has a bug that prevents a project building if you have any files without extensions in them. This is a particular problem for users (like me) using subversion which has extenion-less files.
Eclipse ADT 工具的 21.0.1 版本有一个错误,如果您有任何没有扩展名的文件,它会阻止项目构建。对于使用具有无扩展文件的 subversion 的用户(如我)来说,这是一个特殊问题。
The solution is to install the 21.1 previewversion of the ADT tools and SDK manager from Google. Clear instructions can be found hereand you can read all the background add your voice to the angry mob of developers here.
解决办法是安装谷歌的ADT工具和SDK管理器21.1预览版。可以在此处找到清晰的说明,您可以阅读所有背景,在此处为愤怒的开发者群发声。
回答by jrr
This happened to me today with ADT v21.0.1-543035 and it turned out to be the .svn directories throughout the directory structure. See http://code.google.com/p/android/issues/detail?id=42051
这发生在我今天的 ADT v21.0.1-543035 中,结果是整个目录结构中的 .svn 目录。请参阅http://code.google.com/p/android/issues/detail?id=42051
Worked around the issue by upgrading svn client and working copy to 1.7.
通过将 svn 客户端和工作副本升级到 1.7 解决了该问题。
回答by Jeff Axelrod
For me, the source of the NullPointerException
problem was a host-side Junit test project that references (and tests) code from an Android project. It didn't have a project.properties
file. It's not an Android project, but for some reason the newer version of the SDK somehow expects the file there. To fix the problem, I just copied a project.properties
file from an Android project to the host unit test project.
对我来说,NullPointerException
问题的根源是一个主机端 Junit 测试项目,它引用(和测试)来自 Android 项目的代码。它没有project.properties
文件。它不是 Android 项目,但出于某种原因,较新版本的 SDK 以某种方式期望该文件存在。为了解决这个问题,我只是将一个project.properties
文件从 Android 项目复制到主机单元测试项目。
回答by petrumo
I had something similar. The problem was created by having some files without extension inside the /src folder.
我有类似的事情。该问题是由 /src 文件夹中的一些没有扩展名的文件造成的。
回答by Hisham Bakr
I had the same issue and fixed it by following comment number 6 in this page: Issue 42051: Subversion folder causes NPE in PreCompilerBuilder
我遇到了同样的问题,并按照本页中的第 6 条评论进行了修复: 问题 42051:Subversion 文件夹导致 PreCompilerBuilder 中的 NPE
Let me quote the comment:
让我引用评论:
Solved it by installing subversion support packages for eclipse:
It's still a bug but...
通过为eclipse安装subversion支持包解决了这个问题:
它仍然是一个错误,但是......
回答by mochasoft
same problem here, I closed Eclipse, manually removed any files in folder gen for the project, started Eclipse again, and made a build.
同样的问题,我关闭了 Eclipse,手动删除了项目 gen 文件夹中的所有文件,再次启动 Eclipse,并进行了构建。
回答by Helton Isac
In my case, a branch tool, changed the encode of the file project.properties, I changed the encode to Windows-1265 and the problem was solved.
就我而言,分支工具更改了文件 project.properties 的编码,我将编码更改为 Windows-1265,问题解决了。
回答by Helton Isac
For also me, the source of the NullPointerException problem was a host-side Junit test project that references (and tests) code from an Android project. It didn't have a project.properties file. I added it and problem got fixed.
对我来说,NullPointerException 问题的根源是一个主机端 Junit 测试项目,它引用(和测试)来自 Android 项目的代码。它没有 project.properties 文件。我添加了它,问题得到了解决。
回答by Sharona Sha
I found the solution on this website(https://code.google.com/p/android/issues/detail?id=68755)
我在这个网站上找到了解决方案(https://code.google.com/p/android/issues/detail?id=68755)
So basically, what we should do is : Bring up $ADT_DIR/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini in an editor. Before the -vmargs line, insert these two lines:
所以基本上,我们应该做的是: 在编辑器中调出 $ADT_DIR/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini。在 -vmargs 行之前,插入以下两行:
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java
you can find the eclipse.ini following this (On a Mac OS X system, you can find eclipse.ini by right-clicking (or Ctrl+click) on the Eclipse executable in Finder, choose Show Package Contents, and then locate eclipse.ini in the MacOS folder under Contents)
您可以在下面找到 eclipse.ini(在 Mac OS X 系统上,您可以通过在 Finder 中的 Eclipse 可执行文件上右键单击(或 Ctrl+单击),选择 Show Package Contents,然后找到 eclipse.ini 来找到 eclipse.ini。 ini 在 MacOS 文件夹中的目录下)