在我们的项目中,只有当设备语言设置为土耳其语时,gdata 才会加载 youtube 播放列表。以下是一些日志:
Caused by: com.google.gdata.util.ParseException: Invalid value for attribute : 'name'
at com.google.gdata.data.AttributeHelper.consumeEnum(AttributeHelper.java:592)
at com.google.gdata.data.youtube.YtPublicationState.consumeAttributes(YtPublicationState.java:184)
at com.google.gdata.data.AbstractExtension$AttributesHandler.processEndElement(AbstractExtension.java:263)
at com.google.gdata.util.XmlParser.endElement(XmlParser.java:1013)
at org.xml.sax.helpers.ParserAdapter.endElement(ParserAdapter.java:621)
at org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:353)
at org.apache.harmony.xml.ExpatParser.endElement(ExpatParser.java:156)
at org.apache.harmony.xml.ExpatParser.appendChars(Native Method)
at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:497)
at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:484)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:309)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:267)
at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
at org.xml.sax.helpers.ParserAdapter.parse(ParserAdapter.java:401)
at com.google.gdata.util.XmlParser.parse(XmlParser.java:694)
... 24 more
d[GAThread,5,main]: Service unavailable (code=1), will retry.
d[Service Reconnect,5,main]: Service unavailable (code=1), using local store.
Request failed. Response code: 503, body: org.apache.http.message.BasicHttpResponse@
看起来 youtube 解析器失败了。这个问题是相关的:https ://code.google.com/p/gdata-java-client/issues/detail?id=126 ,我已经下载了最新的gdata
库,但没有任何帮助。我也已经重新构建了gdata
它在INSTALL-src
文件中描述的方式,但是新生成的jar
文件相对于原始 s 的大小不同(每个 ~ > 2kB),jar
尽管我没有更改代码。我在构建过程中有这样的警告:
[javac] m:\dev\gdata-libs\gdata\java\build-src\core.xml:155: warning: 'inclu
deantruntime' was not set, defaulting to build.sysclasspath=last; set to false f
or repeatable builds
[jar] Building jar: m:\dev\gdata-libs\gdata\java\lib\gdata-youtube-2.0.jar
当我尝试jar
在我的项目中替换这些 s 时,我得到验证错误:
Could not find class 'com.google.gdata.data.youtube.VideoFeed', referenced from method com.my.package
10-13 21:14:15.620: W/dalvikvm(32724): VFY: unable to resolve const-class 3981 (Lcom/google/gdata/data/youtube/VideoFeed;) in Lcom/my/package;
感谢任何帮助。谢谢,迈克。