A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/api-client-library/java/google-api-java-client/setup.html below:

Setup Instructions | API Client Library for Java

Setup Instructions

Stay organized with collections Save and categorize content based on your preferences.

If you are not using a generated library, you can download the Google API Client Library for Java and its dependencies in a zip file, or you can use Maven.

Also see the ProGuard setup instructions that are part of the Google HTTP Client Library for Java documentation.

Download the library with dependencies

Download the latest zip file, which you can find on the downloads page, and extract it on your computer. This zip file contains the client library class jar files and the associated source jar files for each artifact and its dependencies. You can find dependency graphs and licenses for the different libraries in the dependencies folder. For more details about the contents of the download, see the readme.html file.

Android

If you are developing for Android, and the Google API you want to use is included in the Google Play Services library, use the Google Play Services library for the best performance and experience.

If you are using the Google API Client Library for Java with Android, it is important to know which dependencies are compatible with Android, specifically which Android SDK level. Android applications require the following jar files, or newer compatible versions, from the libs folder:

Warning: For Android, you MUST place the .jar files in a directory named "libs" so that the APK packager can find them. Otherwise, you will get a NoClassDefFoundError error at runtime. Google App Engine

Google App Engine applications require the following jar files, or newer compatible versions, from the libs folder:

Servlet

Servlet applications require the following jar files, or newer compatible versions, from the libs folder:

Generic Java

General purpose Java applications require the following jar files, or newer compatible versions, from the libs folder:

Generated libraries for Google APIs

The repository of the generated libraries has instruction on how to use each version of the APIs.

Maven

The Google API Client Library for Java is in the central Maven repository. The Maven groupId for all artifacts for this library is com.google.api-client. Specific Maven instructions are given for each module (below).

Modules

This library is composed of nine modules:

google-api-client

The Google API Client Library for Java (google-api-client) is designed to be compatible with all supported Java platforms, including Android.

Maven usage:

<dependency>
  <groupId>com.google.api-client</groupId>
  <artifactId>google-api-client</artifactId>
  <version>2.4.0</version>
</dependency>

On Android, you will need to explicitly exclude unused dependencies:

<dependency>
  <groupId>com.google.api-client</groupId>
  <artifactId>google-api-client</artifactId>
  <version>2.4.0</version>
  <exclusions>
    <exclusion>
      <artifactId>xpp3</artifactId>
      <groupId>xpp3</groupId>
    </exclusion>
    <exclusion>
      <artifactId>httpclient</artifactId>
      <groupId>org.apache.httpcomponents</groupId>
    </exclusion>
    <exclusion>
      <artifactId>junit</artifactId>
      <groupId>junit</groupId>
    </exclusion>
    <exclusion>
      <artifactId>android</artifactId>
      <groupId>com.google.android</groupId>
    </exclusion>
  </exclusions>
</dependency>
google-api-client-android

Extensions to the Google API Client Library for Java (google-api-client-android) support Java Google Android (only for SDK >= 2.1) applications. This module depends on google-api-client and google-http-client-android.

Maven usage:

<dependency>
  <groupId>com.google.api-client</groupId>
  <artifactId>google-api-client-android</artifactId>
  <version>2.4.0</version>
</dependency>
google-api-client-servlet

Servlet and JDO extensions to the Google API Client Library for Java (google-api-client-servlet) support Java servlet web applications. This module depends on google-api-client and google-oauth-client-servlet.

Maven usage:

<dependency>
  <groupId>com.google.api-client</groupId>
  <artifactId>google-api-client-servlet</artifactId>
  <version>2.4.0</version>
</dependency>
google-api-client-appengine

Google App Engine extensions to the Google API Client Library for Java (google-api-client-appengine) support Java Google App Engine applications. This module depends on google-api-client, google-api-client-servlet, google-oauth-client-appengine and google-http-client-appengine.

Maven usage:

<dependency>
  <groupId>com.google.api-client</groupId>
  <artifactId>google-api-client-appengine</artifactId>
  <version>2.4.0</version>
</dependency>
google-api-client-gson

GSON extensions to the Google API Client Library for Java (google-api-client-gson). This module depends on google-api-client and google-http-client-gson.

Maven usage:

<dependency>
  <groupId>com.google.api-client</groupId>
  <artifactId>google-api-client-gson</artifactId>
  <version>2.4.0</version>
</dependency>
google-api-client-jackson2

Jackson2 extensions to the Google API Client Library for Java (google-api-client-jackson2). This module depends on google-api-client and google-http-client-jackson2.

Maven usage:

<dependency>
  <groupId>com.google.api-client</groupId>
  <artifactId>google-api-client-jackson2</artifactId>
  <version>2.4.0</version>
</dependency>
google-api-client-protobuf

Protocol buffer extensions to the Google API Client Library for Java (google-api-client-protobuf). This module depends on google-http-client-protobuf and google-api-client.

Maven usage:

<dependency>
  <groupId>com.google.api-client</groupId>
  <artifactId>google-api-client-protobuf</artifactId>
  <version>2.4.0</version>
</dependency>
google-api-client-xml

XML extensions to the Google API Client Library for Java (google-api-client-xml). This module depends on google-api-client and google-http-client-xml.

Maven usage:

<dependency>
  <groupId>com.google.api-client</groupId>
  <artifactId>google-api-client-xml</artifactId>
  <version>2.4.0</version>
</dependency>

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-07 UTC."],[[["This page provides instructions for downloading and using the Google API Client Library for Java with various Java platforms, including Android, Google App Engine, Servlets, and generic Java applications."],["Developers can download the library with dependencies in a zip file or utilize Maven for integration."],["Specific JAR files are required for different platforms, ensuring compatibility and preventing runtime errors."],["For Android development, the Google Play Services library is recommended when available for optimal performance."],["The library is modular, offering extensions for data formats like Gson, Jackson2, Protocol Buffers, and XML through separate dependencies."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4