简体   繁体   中英

Clarifications on Google Drive Java Quickstart

I am still trying to get my head around some intricacies in java and I need to clearly understand if Google Drive API can be set up and used in Eclipse and JDK.

This is because I noticed that in the quickstart here: https://developers.google.com/drive/v3/web/quickstart/java

One of the requirements is Gradle 2.3. And also a need for a Build.gradle file.

Having done little work on Android Studio, I am aware that this is possible when coding in Android-SDK environment. The challenge is that the program I am writing is meant for JRE machines and not Android enviroment. So is the Google API meant to be run on Android-Only enviroment? If no, is there a quickstart for setting it up on Eclipse WITHOUT the gradle, build and all the android related aspects?

I think Gradle is not a must, but also Maven

    `<dependency>
        <groupId>com.google.api-client</groupId>
        <artifactId>google-api-client</artifactId>
        <version>1.22.0</version>
    </dependency>
    <dependency>
        <groupId>com.google.oauth-client</groupId>
        <artifactId>google-oauth-client-jetty</artifactId>
        <version>1.22.0</version>
    </dependency>
    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-drive</artifactId>
        <version>v3-rev108-1.22.0</version>
    </dependency>`

And if you aren't really want drill into Google API, perhaps you can consider to use same libraries to simplify your codes.

eg Google Drive FileUtils (GDFU) https://github.com/twinzen/Google-Drive-FileUtils

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM