gpt4 book ai didi

21.0.1 android sdk 上的 Android 预编译器错误

转载 作者:IT王子 更新时间:2023-10-28 23:28:35 33 4
gpt4 key购买 nike

我在另一台电脑上查看了旧的 android 项目,我得到了一个Android Pre Compiler Null 指针异常错误,每次保存时都无法生成 R.java。该项目是使用其他库的库项目。

项目不起作用的新系统是:64位的Ubuntu,ADT eclipse ,安卓 SDK 工具 21.0.1,Android sdk 平台工具 16错误是:

!ENTRY org.eclipse.core.resources 4 2 2013-01-07 02:07:15.177 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources". !STACK 0 java.lang.NullPointerException at com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.build(PreCompilerBuilder.java:673) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

!ENTRY org.eclipse.core.resources 4 75 2013-01-07 02:07:15.717 !MESSAGE Errors occurred during the build. !SUBENTRY 1 com.android.ide.eclipse.adt 4 75 2013-01-07 02:07:15.717 !MESSAGE Errors running builder 'Android Pre Compiler' on project 'MyProject'. !STACK 0 java.lang.NullPointerException at com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.build(PreCompilerBuilder.java:673) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

该项目在旧系统上运行:

旧系统是:32位的Ubuntu,4.2.1 eclipse 朱诺,安卓sdk工具21,

Git 被用作版本控制系统。这是一个非常奇怪的问题,我检查了所有的 xml,用 lint 运行它们以找到 xml 构建问题,但每次保存都没有运气,我有同样的错误,并且没有生成 R.java。谢谢

最佳答案

21.0.1 中的 Android 预编译器似乎严重损坏,在 .svn 目录和 .DS_Store 文件以及没有文件扩展名的文件上崩溃。

对我有用的解决方案是按照以下步骤升级到 21.1 rc1:
1. 按照此处的说明进行操作:http://tools.android.com/preview-channel
2. 确保更新 SDK Manager 和 ADT
3.重启Eclipse

查看此错误以获取更多信息: http://code.google.com/p/android/issues/detail?id=42051

关于21.0.1 android sdk 上的 Android 预编译器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14188650/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com