简体   繁体   English

Eclipse Android Neon:大量错误

[英]Eclipse Android Neon: Tons of errors

I reinstalled 4-5 times the Eclipse Neon (Latest) and I downloaded following SDK's:我重新安装了 Eclipse Neon(最新)4-5 次,并下载了以下 SDK:

  • SDK Platform API 24 Re. SDK 平台 API 24 Re。 1 1
  • SDK Platform API 8 Rev. 3 SDK 平台 API 8 修订版 3
  • Android SDK Tools Rev. 25.1.7 Android SDK 工具修订版 25.1.7
  • Android SDK Platform-Tools Rev. 24 Android SDK 平台工具修订版 24
  • Android SDK Build-Tools Rev. 24 Android SDK 构建工具修订版 24
  • Android SDK Build-Tools Rev. 23.0.3 Android SDK 构建工具修订版 23.0.3
  • Google USB Driver Rev. 11 Google USB 驱动程序修订版 11

And I have JDK and JRE 1.8.0 update 92, I use Eclipse Java Neon perfectly errorless.我有 JDK 和 JRE 1.8.0 更新 92,我使用 Eclipse Java Neon 完全没有错误。

When I create a project, it looks like this:当我创建一个项目时,它看起来像这样:

在此处输入图片说明

And I'm getting following errors:我收到以下错误:

Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'zzzzf'.
java.lang.NullPointerException

And it cannot resolve variable R. After editing project properties, I get this message:它无法解析变量 R。编辑项目属性后,我收到以下消息:

[2016-07-10 00:13:12 - zzzzf] Project has no project.properties file! Edit the project properties to set one.

Also I am getting some kind of errors that I dont remember and Eclipse says "Good news! It seems this bug is fixed on next updates. Vİsit null for further information."此外,我遇到了一些我不记得的错误,Eclipse 说“好消息!看来这个错误已在下一次更新中修复。请访问 null 以获取更多信息。” But when I check the updates, there are no update.但是当我检查更新时,没有更新。 -- Errors are about running the workbench. -- 错误与运行工作台有关。

I tried:我试过:

  • Adding resource filters添加资源过滤器
  • Editing eclipse.ini by adding this line before -vmargs通过在 -vmargs 之前添加这一行来编辑 eclipse.ini

    -vm /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home -vm /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home

Thanks for your help and giving a part of your valuable time.感谢您的帮助并抽出宝贵的时间。 I am using AIDE for preparing applications and when I switch to PC, I'm busy with problems instead of Java codes...我正在使用 AIDE 准备应用程序,当我切换到 PC 时,我正忙于处理问题而不是 Java 代码......

Problem is solved by switching to Android Studio, because Eclipse is no longer supported by ADT.问题通过切换到 Android Studio 解决,因为 ADT 不再支持 Eclipse。 So that I am getting rid of that errors.这样我就可以摆脱这些错误。

As of Dec 2016, I am able to create, compile and run Android projects under Eclipse Neon.截至 2016 年 12 月,我能够在 Eclipse Neon 下创建、编译和运行 Android 项目。

My installation details are:我的安装细节是:

  • ADT Tools 23.0.7.2120684 ADT 工具 23.0.7.2120684
  • Eclipse Platform 4.6.1.M20160907-1200 (Eclipse Neon.1) Eclipse 平台 4.6.1.M20160907-1200 (Eclipse Neon.1)
  • Ubuntu 16.04 Ubuntu 16.04

There are some glitches:有一些小故障:

  • LogCat and Devices views don't render well LogCat 和 Devices 视图不能很好地呈现
  • Previewing a layout is possible, but you have to choose Android version < 23 in the preview version dropdown可以预览布局,但您必须在预览版本下拉列表中选择 Android 版本 < 23

If that doesn't work, you can try this independently maintained ADT as well.如果这不起作用,您也可以尝试这个独立维护的 ADT I get the same result with this ADT, so I didn't bother using it.我用这个 ADT 得到了相同的结果,所以我没有费心使用它。 It seems to be especially useful for those using Android NDK.它似乎对那些使用 Android NDK 的人特别有用。

Update: The Eclipse Foundation also maintains a fork of ADT called AndMore .更新:Eclipse 基金会还维护一个名为AndMore的 ADT分支 It works fine with Neon.它适用于霓虹灯。

For converting existing ADT projects to Android-Neon, just select "configure-->convert From ADT" from the main popup menu.要将现有的 ADT 项目转换为 Android-Neon,只需从主弹出菜单中选择“configure-->convert From ADT”。

Also Neon appears to be able to profile your hardware.此外,Neon 似乎能够分析您的硬件。 I was getting crashes until I simply removed the memory and GC entries from eclipse.ini在我简单地从 eclipse.ini 中删除内存和 GC 条目之前,我一直崩溃

When a project is created in Eclipse it automatically creates a folder called .settings And files named .classpath , .project , project.properties在 Eclipse 中创建项目时,它会自动创建一个名为.settings 的文件夹和名为.classpath.projectproject.properties 的文件

You can create a new project using the same package name and just copy the files over into this new project, rebuild it.您可以使用相同的包名创建一个新项目,然后将文件复制到这个新项目中,重新构建它。

The more advanced, more direct and less headache approach is to find a current Eclipse project and copy the above named files over and edit them for this project.更高级、更直接、更少头疼的方法是找到一个当前的 Eclipse 项目,将上面命名的文件复制过来,然后为这个项目编辑它们。

Select your android project and go to Properties => Java Build Path => Libraries => Add library => Android Classpath Contanier => Next => select your project android选择您的 android 项目并转到 Properties => Java Build Path => Libraries => Add library => Android Classpath Contanier => Next => 选择您的项目 android

Then push button Finish => Apply and Ok!然后按下按钮完成 => 应用并确定! and your errors is empty.你的错误是空的。

I hope help you... Good luck希望能帮到你...祝你好运

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

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