I am getting this error:
The import com.google.api.client cannot be resolved
My configuration is below:
Project Properties - Android:
Java Build Path:
I still get the error below even after restarting Eclipse.
Can anyone help? Thx :D
Your GoogleApiClient instance will automatically connect after your activity calls onStart() and disconnect after calling onStop(). Your app can immediately begin making read requests to Google APIs after building GoogleApiClient, without waiting for the connection to complete.
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 .
The GoogleApiClient.Builderclass provides methods that allow you to specify the Google APIs you want to use and your desired OAuth 2.0 scopes. Here is a code example that creates a GoogleApiClientinstance that connects with the Google Drive service:
Accessing Google APIs with GoogleApiClient (deprecated) Google Play services LanguageEnglish Bahasa Indonesia Deutsch Español Français Português – Brasil Русский 中文 – 简体 日本語 한국어 Sign in Home Guides Reference Samples Support Downloads Google Play services Home
You haven't added the client libraries in your project. http://code.google.com/p/google-api-java-client/wiki/Setup. You will get the google-api-java-client-1.14.1-beta.zip file at the above link. Save those jar files in your libs folder of Android project.
Add this:
<!-- https://mvnrepository.com/artifact/com.google.api-client/google-api-client -->
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
<version>1.23.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.oauth-client/google-oauth-client-jetty -->
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-jetty</artifactId>
<version>1.23.0</version>
</dependency>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With