eclipse Android 预编译器错误?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14156248/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 19:44:45  来源:igfitidea点击:

Android Pre Compiler error?

androideclipseadt

提问by Saurabh Bayani

I am facing a very annoying problem. I wanted to use sliding menuin my project, after long and frustrating search i come to know that i have to update my eclipse + ADT to new one to import that library properly, and i got demo app running fine.

我正面临一个非常烦人的问题。我想在我的项目中使用滑动菜单,经过漫长而令人沮丧的搜索,我知道我必须将我的 eclipse + ADT 更新为新的才能正确导入该库,并且我的演示应用程序运行良好。

now i want to integrate it in my project, so i import my project in same workspace and i received following error after just importing it.

现在我想将它集成到我的项目中,所以我在同一个工作区中导入了我的项目,并且在导入后收到了以下错误。

Errors occurred during the build.
Errors running builder 'Android Pre Compiler' on project 'MyProject'.
java.lang.NullPointerException

I been through many sites plus some questions like thisor thisbut found nothing concrete. Also i tried different cases that are possible, but they are of no use.

我浏览过很多网站,还有一些类似这样这样的问题,但没有发现任何具体的问题。我也尝试了可能的不同情况,但它们没有用。

so i am in middle of strange situation, that library cannot be import on old eclipse(Galileo + ADT v15) , and project can not be import on new eclipse(ADT Bundle eclipse + ADT v21).

所以我处于奇怪的情况中,无法在旧日食(Galileo + ADT v15)上导入该库,并且无法在新日食(ADT Bundle eclipse + ADT v21)上导入项目。

somebody please help me on this.

有人请帮助我。

采纳答案by Giorgos Kylafas

I believe you experience bug http://code.google.com/p/android/issues/detail?id=42051

我相信您遇到错误http://code.google.com/p/android/issues/detail?id=42051

Do you have any files with no extension in their name, e.g. README? Try adding an extension to the files, e.g. README-> README.txt.

您是否有名称中没有扩展名的文件,例如README?尝试为文件添加扩展名,例如README-> README.txt

Do you use Subversion? Try installing packages:

你使用颠覆吗?尝试安装软件包:

  • Subversive SVN JDT Ignore Extensions
  • Subversive SVN Team Provider
  • 颠覆性的 SVN JDT 忽略扩展
  • 颠覆性的SVN团队提供者

回答by schmidiii

I think we suffered from the bug Giorgos Kylafas mentioned. Luckily Google released an update for the ADT on their Preview Channel as none of the other mentioned solutions helped me.

我认为我们遭受了 Giorgos Kylafas 提到的错误。幸运的是,谷歌在他们的预览频道上发布了 ADT 的更新,因为其他提到的解决方案都没有帮助我。

To Install the updates follow the instructions given in Comment #20 from tnorbye: http://code.google.com/p/android/issues/detail?id=42051#c20

要安装更新,请按照 tnorbye 的评论 #20 中给出的说明进行操作:http: //code.google.com/p/android/issues/detail?id=42051#c20

This solved the Problem for me. Here s the DirectLink to the Preview Channel: http://tools.android.com/preview-channel

这为我解决了问题。这是预览频道的 DirectLink:http: //tools.android.com/preview-channel

回答by manpreet singh

The problem also occurs when you have a referred a library project and you "Close" that project .

当您引用一个库项目并“关闭”该项目时,也会出现该问题。

So you may try reopening any closed project in the workspace to which you might have referred .

因此,您可以尝试重新打开您可能引用的工作区中的任何已关闭项目。

回答by Saurabh Bayani

By the way,

顺便一提,

for those who don't want to install package and other things.. there is quick fix ....

对于那些不想安装软件包和其他东西的人......有快速修复......

  1. Search for svnin your project folder and delete all folders named as SVN(might be hidden).

  2. Search for *.svnand again delete all file of .svnextension

  3. Import your Project again.

  1. svn在您的项目文件夹中搜索并删除所有名为SVN(可能被隐藏)的文件夹。

  2. 搜索*.svn并再次删除所有.svn扩展名文件

  3. 再次导入您的项目。

IMPORTANT:I said this is quick solution if you are in hurry, This is not accurate & best solution. It will clear all records of your "svn" for your project.

重要提示:我说过,如果您赶时间,这是快速解决方案,这不是准确和最佳的解决方案。它将清除您项目的“svn”的所有记录。

If you don't know how to re-configure it again then install package mentioned above in Giorgos Kylafasand schmidiii's answers , It is perfect solution

如果您不知道如何重新配置​​它,请安装上面提到的Giorgos Kylafasschmidiii的答案中的包,这是完美的解决方案

回答by Maksim Dmitriev

It has just happened to me. My project depends on android-support-v7-appcompatwhich was closed. Every time when I pressed Ctrl + S, an error dialog showed up. After I had opened android-support-v7-appcompat, I didn't see the dialog anymore.

它刚刚发生在我身上。我的项目取决于android-support-v7-appcompat哪个已关闭。每次我按下时Ctrl + S,都会出现一个错误对话框。打开后android-support-v7-appcompat,我再也看不到对话框了。

回答by Sanjayr2d2

I tried deleting the project from Eclipse and then re-imported the project that was failing. It all worked fine after that.

我尝试从 Eclipse 中删除项目,然后重新导入失败的项目。之后一切正常。