Android ADT Eclipse 插件,parseSDKContent 失败

2024-05-17

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

  • 日食3.5
  • Mac OS X 10.5
  • 适用于 x86 mac 的 Android SDK
  • ADT Eclipse 插件 0.9.6

我已将 set $PATH 设置为我的 SDK/tools 目录(如果我只使用 Eclipse,这应该不重要吗?)并启动 Eclipse,但是当我尝试在 Eclipse 中设置 SDK 的路径时,我收到错误“解析SdkContent失败”。抛出异常的堆栈跟踪是

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)

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


所以我的解决方案完全不同。该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

关闭日食。再次打开它。

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

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Android ADT Eclipse 插件,parseSDKContent 失败 的相关文章

随机推荐