问题
I'm trying to get started with the Android SDK on OS X 10.6.8 but can't load any packages in the SDK manager.
Here's what I see in the SDK Manager: http://sarahtube.s3.amazonaws.com/20111221_Android_GUI_SDK_Manager_GUI_Java_Exception.jpg
Here's my Java/JDK:
$ java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
Here's the exception I get on loading the SDK or trying to update from within the SDK manager or from the command line:
Exception in thread "Loading Sources" java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredElementNSImpl.getTextContent()Ljava/lang/String; at com.android.sdklib.internal.repository.AddonsListFetcher.parseAddonsList(AddonsListFetcher.java:470) at com.android.sdklib.internal.repository.AddonsListFetcher.fetch(AddonsListFetcher.java:170) at com.android.sdkuilib.internal.repository.UpdaterData.loadRemoteAddonsListInTask(UpdaterData.java:1042) at com.android.sdkuilib.internal.repository.UpdaterData.access$900(UpdaterData.java:73) at com.android.sdkuilib.internal.repository.UpdaterData$5.run(UpdaterData.java:1012) at com.android.sdkuilib.internal.tasks.ProgressView$2.run(ProgressView.java:128) at com.android.sdkuilib.internal.tasks.ProgressView.startTask(ProgressView.java:150) at com.android.sdkuilib.internal.tasks.ProgressViewFactory.start(ProgressViewFactory.java:44) at com.android.sdkuilib.internal.repository.UpdaterData.loadRemoteAddonsList(UpdaterData.java:1010) at com.android.sdkuilib.internal.repository.sdkman2.PackageLoader$1.run(PackageLoader.java:169) at com.android.sdkuilib.internal.tasks.ProgressView$2.run(ProgressView.java:118) at java.lang.Thread.run(Thread.java:680)
I get this error with both R15 and R16 of the SDK. I previously installed R11 but that didn't work either so deleted that when R15 was released.
I have already set https URLs to be retrieved over http.
I'd really like to get into Android development so any advice would be appreciated.
回答1:
Solved! Answering my own question as this might help others in the future.
After reading this answer problems with java installation (xerces) on mac I found an ancient xerces,jar in /Users/MYUSERDIR/Library/Java/Extensions/
Moving this out of the Extensions directory solved the issue.
Thanks stackoverflow (and me).
来源:https://stackoverflow.com/questions/8582555/android-sdk-manager-java-loading-sources-exception-on-os-x