Android & OpenId4Java
Any special tricks/gotchas for building an OpenId app for Android using OpenId4Java? Haven't found info on others that have made this combo work.
I have a simple app that compiles fine in Eclipse & command line, but when I install the apk, I get a bunch of debug messages indicating there are codec classes with earlier definitions.
E.g.: D/dalvikvm(11571): DexOpt: 'Lorg/apache/commons/codec/Decoder;' has an earlier definition; blocking outNOTE: I'm using the xerces, guice, nekohtml, commons-codec that came with the openid4java-0.9.6.jar
These are followed by debug messages that those classes aren't being verified, and some info messages sprinkled about ambiguous other codec classes.
Starting the app gives another bunch of messages:
I/dalvikvm(11582): Failed resolving Lorg/apache/xerces/dom/NodeImpl; interface 1983 'Lorg/w3c/dom/events/EventTarget;' W/dalvikvm(11582): Link of class 'Lorg/apache/xerces/dom/NodeImpl;' failed
The main activity comes up fine, but when I attempt to call consumerManager.discover with an id for yahoo or google, I get an IllegalArgumentException:
I/Discovery(11582): Starting discovery on URL identifier: https://www.google.com/accounts/o8/id
W/System.err(11582): java.lang.IllegalArgumentException: http://java.sun.com/xml/jaxp/properties/schemaLanguage
W/System.err(11582): at org.apache.harmony.xml.parsers.DocumentBuilderFactoryImpl.setAttribute(DocumentBuilderFactoryImpl.java:86)
W/System.err(11582): at org.openid4java.discovery.xrds.XrdsParserImpl.parseXmlInput(XrdsParserImpl.java:168)
W/System.err(11582): at org.openid4java.discovery.xrds.XrdsParserImpl.parseXrds(XrdsParserImpl.java:50)
W/System.err(11582): at org.open开发者_StackOverflow中文版id4java.discovery.yadis.YadisResolver.retrieveXrdsDocument(YadisResolver.java:301)
W/System.err(11582): at org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.java:256)
W/System.err(11582): at org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.java:232)
W/System.err(11582): at org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.java:166)
W/System.err(11582): at org.openid4java.discovery.Discovery.discover(Discovery.java:147)
W/System.err(11582): at org.openid4java.discovery.Discovery.discover(Discovery.java:129)
W/System.err(11582): at org.openid4java.consumer.ConsumerManager.discover(ConsumerManager.java:542)
Suggestions? Insights?
精彩评论