Android ADT Eclipse 插件,parseSDKContent 失败

发布于 2024-08-29 21:51:10 字数 1201 浏览 5 评论 0原文

我刚刚设置了我的第一个 Android 开发环境,其中包括

  • Eclipse 3.5
  • Mac OSX 10.5
  • Android SDK for x86 macs
  • ADT Eclipse 插件 0.9.6

我已将 set $PATH 设置为我的 SDK/tools 目录(如果我只使用 Eclipse 对吗?)并启动 Eclipse,但是当我尝试在 Eclipse 中设置 SDK 的路径时,出现错误“parseSdkContent failed”。抛出异常的堆栈跟踪是

java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema
at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:181)
at com.android.ide.eclipse.adt.internal.sdk.LayoutDevicesXsd.getValidator(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.LayoutDeviceManager.parseLayoutDevices(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.LayoutDeviceManager.loadDefaultLayoutDevices(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.LayoutDeviceManager.loadDefaultAndUserDevices(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.Sdk.<init>(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.Sdk.loadSdk(Unknown Source)
at com.android.ide.eclipse.adt.AdtPlugin$13.run(Unknown Source)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

我看不到我在设置过程中错过了任何内容,根据说明它基本上应该开箱即用。关于为什么这可能失败的任何想法?

I've just set up my first Android development environment consisting of

  • Eclipse 3.5
  • Mac OSX 10.5
  • Android SDK for x86 macs
  • ADT Eclipse plugin 0.9.6

I've set set $PATH to my SDK/tools directory (which shouldn't matter if I only use Eclipse right?) and started Eclipse, but when I try to set the path to the SDK in Eclipse, i get the error "parseSdkContent failed". The stack trace of from the thrown exception is

java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema
at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:181)
at com.android.ide.eclipse.adt.internal.sdk.LayoutDevicesXsd.getValidator(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.LayoutDeviceManager.parseLayoutDevices(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.LayoutDeviceManager.loadDefaultLayoutDevices(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.LayoutDeviceManager.loadDefaultAndUserDevices(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.Sdk.<init>(Unknown Source)
at com.android.ide.eclipse.adt.internal.sdk.Sdk.loadSdk(Unknown Source)
at com.android.ide.eclipse.adt.AdtPlugin$13.run(Unknown Source)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

I can't see that I've missed anything in the setup process, according to the instructions it should basically just work out of the box. Any ideas as to why this might fail?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

娇柔作态 2024-09-05 21:51:30

在使用 adt-bundle-windows-x86_64-20140702 的 Windows 7 上:
去除
C:\Users\YOUR_WINDOWS_USERNAME.android
为我创造了魔法:)

On Windows 7 with adt-bundle-windows-x86_64-20140702:
removing
C:\Users\YOUR_WINDOWS_USERNAME.android
did the magic for me :)

裸钻 2024-09-05 21:51:29
  • 已安装 API 19
  • 在 Package Explorer|appcompat_v7 Android 4.4.2 下卸载 API 20、20L

未显示

然后删除 sdk/platforms 和 sdk/system-images 中相应的 20 和 20L 文件夹

重新启动并确定

ADT Package 23.0.2.1259578
Eclipse 平台 4.2.2.M20130204-1200

  • Installed API 19
  • Deinstalled API 20, 20L

Under Package Explorer|appcompat_v7 Android 4.4.2 didn't show up

Then removed corresponding 20-and 20L-folders in sdk/platforms and sdk/system-images

Restart and ok

ADT Package 23.0.2.1259578
Eclipse Platform 4.2.2.M20130204-1200

呆萌少年 2024-09-05 21:51:28

我尝试删除您的所有项目,然后重新启动应用程序

I try removeing all your projects then restart the application

皓月长歌 2024-09-05 21:51:24

快速浏览一下 http://java.lang. sun.com/javase/6/docs/api/javax/xml/validation/SchemaFactory.html 表明 JDK 1.6 设置有问题。

将 eclipse 中的 -vm 标志设置为原始 1.5 并没有帮助,但在删除明显错误配置的 1.6 的所有痕迹后,一切都像魅力一样工作。

A quick glance at http://java.sun.com/javase/6/docs/api/javax/xml/validation/SchemaFactory.html suggests that something is wrong with the JDK 1.6 setup.

Setting the -vm flag in eclipse to the original 1.5 did not help, but after removing all traces of the apparently misconfigured 1.6 everything worked like a charm.

暮色兮凉城 2024-09-05 21:51:20

步骤 1. 找到名为:.android 的文件夹

该文件夹可以位于您的 Windows 用户目录中,例如在 Windows 8 中:
C:\Users\YOUR_WINDOWS_USERNAME.android
步骤2.删除这个文件夹.android

步骤3.重新启动Eclipse,现在就OK了

Step 1. Find the folder named: .android

This folder can be located in your Windows user directory, for example in Windows 8:
C:\Users\YOUR_WINDOWS_USERNAME.android
Step 2. Delete this folder .android

Step 3. Restart Eclipse and it is OK now

夏雨凉 2024-09-05 21:51:19

对我来说,从 ADT 插件更新 DDMS 就成功了!

在此之前,为了节省时间,我只更新了ADT插件,没有像Android DDMS、TraceView等那样更新,所以我遇到了同样的问题,经过几次重新启动和Google搜索后,每个人都提出了不同的解决方案。我更新了我的 Android DDMS 并重新启动了 eclipse。

它的作用就像一个魅力。

我不必删除我的工作区或更新我的 .project 文件等。

For me updating the DDMS from ADT plugin did the trick!

Before that for saving time I only updated ADT plugin, nothing else like Android DDMS, TraceView etc. so I ran into same issue, after couple of restarts and Google searches everyone was proposing different solutions. I updated my Android DDMS and restarted eclipse.

And It worked like a charm.

I didn't had to remove my workspace or update my .project file etc.

冰魂雪魄 2024-09-05 21:51:14

所以我的解决方案完全不同。该project.properties已损坏。我必须从命令行编辑它,因为 Eclipse 不想为我做任何事情。我删除了所有不需要的东西。这样文件看起来像这样:

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "ant.properties", and override values to adapt the script to your
# project structure.

# Project target.
target=android-15

Closed Eclipse.再次打开它。

然后我返回项目属性并重置我的库。这解决了问题。希望这对其他人有帮助!

So my solution was completely different. The project.properties was corrupted. I had to edit it from the command line as eclipse didn't want to do anything for me. I deleted everything that was unnecessary. So that the file looked like this:

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "ant.properties", and override values to adapt the script to your
# project structure.

# Project target.
target=android-15

Closed Eclipse. Opened it again.

I then went back into the project properties and reset my libraries. This solved the problem. Hope this helps someone else!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文