Gdata api 和 Google-api-client-library 一起吗?

发布于 2024-11-16 08:26:19 字数 204 浏览 4 评论 0原文

是否可以在同一个应用程序中使用较旧的 GData API 和较新的 google-apis-java-client 库?我问的原因是我正在使用新的客户端库来访问谷歌文档中的电子表格。我还想访问 picasa 来上传和下载图片。在我的一生中,我无法让它与新库一起工作,并且没有示例代码。不过,有一个针对旧 GData 库的示例代码。使用两者的问题是它们使用一些相同的库,但版本不同。这是在安卓上。

Is it possible to use the older GData Apis and the newer google-apis-java-client libraries in the same app? Reason I ask is I am using the new client libraries for accessing spreadsheets in google docs. I would also like to access picasa to upload and download pics. For the life of me I can not get this working with the new libraries and there is not a sample code for it. However there is a sample code for the older GData libs. The problem with using both is they use the some of the same libs, but different versions. This is on Android.

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

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

发布评论

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

评论(1

乖乖兔^ω^ 2024-11-23 08:26:19

这是可能的,但你是对的,由于 Guava 库(前 Google Collections)存在一些冲突。

我们使用 Maven 来管理我们的依赖项。这是我们用于 GData 库的存储库:

    <repository>
        <id>burtsev-net-maven</id>
        <name>Burtsev.Net Maven Repository</name>
        <url>http://maven.burtsev.net</url>
    </repository>

这是我们使用的可以很好地协同工作的依赖项,GData 1.47.1 和 Google API 1.17.0:

    <dependency>
        <groupId>com.google.gdata.gdata-java-client</groupId>
        <artifactId>gdata-docs-3.0</artifactId>
        <version>1.47.1</version>
    </dependency>
    <dependency>
        <groupId>com.google.gdata.gdata-java-client</groupId>
        <artifactId>gdata-docs-meta-3.0</artifactId>
        <version>1.47.1</version>
    </dependency>
            <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-admin</artifactId>
        <version>directory_v1-rev15-1.16.0-rc</version>
    </dependency>
    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-drive</artifactId>
        <version>v2-rev105-1.17.0-rc</version>
    </dependency>
    <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-gson</artifactId>
        <version>1.17.0-rc</version>
    </dependency>
    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-storage</artifactId>
        <version>v1beta2-rev36-1.17.0-rc</version>
    </dependency>
    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-bigquery</artifactId>
        <version>v2-rev125-1.17.0-rc</version>
    </dependency>
    <dependency>
        <groupId>com.google.oauth-client</groupId>
        <artifactId>google-oauth-client</artifactId>
        <version>1.17.0-rc</version>
    </dependency>

It is possible, but you're right there are some conflicts due to the Guava library (ex Google Collections).

We use Maven to manage our dependencies. Here is the repository we use for GData libs :

    <repository>
        <id>burtsev-net-maven</id>
        <name>Burtsev.Net Maven Repository</name>
        <url>http://maven.burtsev.net</url>
    </repository>

And here are the dependencies we use that play nice together, GData 1.47.1 and Google API 1.17.0 :

    <dependency>
        <groupId>com.google.gdata.gdata-java-client</groupId>
        <artifactId>gdata-docs-3.0</artifactId>
        <version>1.47.1</version>
    </dependency>
    <dependency>
        <groupId>com.google.gdata.gdata-java-client</groupId>
        <artifactId>gdata-docs-meta-3.0</artifactId>
        <version>1.47.1</version>
    </dependency>
            <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-admin</artifactId>
        <version>directory_v1-rev15-1.16.0-rc</version>
    </dependency>
    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-drive</artifactId>
        <version>v2-rev105-1.17.0-rc</version>
    </dependency>
    <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-gson</artifactId>
        <version>1.17.0-rc</version>
    </dependency>
    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-storage</artifactId>
        <version>v1beta2-rev36-1.17.0-rc</version>
    </dependency>
    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-bigquery</artifactId>
        <version>v2-rev125-1.17.0-rc</version>
    </dependency>
    <dependency>
        <groupId>com.google.oauth-client</groupId>
        <artifactId>google-oauth-client</artifactId>
        <version>1.17.0-rc</version>
    </dependency>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文