calendar-android-sample library issue

852 views
Skip to first unread message

Luke Harvey

unread,
Sep 14, 2011, 3:15:35 PM9/14/11
to google-api-java-client
Hello,

I'm trying to get the calendar-android-sample working in eclipse and
have run into an issue. Once I've imported the project into eclipse
via File>Import I am seeing missing required library errors.

Project 'calendar-android-sample' is missing required library: '....
\.m2\repository\com\google\apis-samples\shared-sample-calendar
\v2-1.0.0\shared-sample-calendar-v2-1.0.0.jar

Project 'calendar-android-sample' is missing required library: '....
\.m2\repository\com\google\apis-samples\shared-sample-gdata
\1.0.0\shared-sample-gdata-1.0.0.jar

Project 'calendar-android-sample' is missing required library: 'libs/
google-api-client-1.4.1-beta.jar'


Is there a place where I need to go to download these jar files? I
can't seem to find shared-sample-calendar-v2-1.0.0.jar or shared-
sample-gdata-1.0.0.jar

Thanks!

Davy De Waele

unread,
Sep 15, 2011, 4:20:37 AM9/15/11
to google-api-...@googlegroups.com
As described in the instructions that go with the sample, you need to have the m2eclipse plugin installed. (http://m2eclipse.sonatype.org/installing-m2eclipse.html).
It will parse the pom.xml file, and make sure all the dependencies (and transitive dependencies) will be downloaded automatically.

It will save you the effort of searching / downloading / configuring every single dependency of the project.

Luke Harvey

unread,
Sep 15, 2011, 1:09:03 PM9/15/11
to google-api-java-client
Thanks for the response. I had the m2eclipse plugin installed, but it
didn't appear to be working properly. I re-installed and am now seeing
this issue:
Missing artifact com.google.apis-samples:shared-sample-
calendar:jar:v2-1.0.0:compile
Am I missing something else?

helde...@gmail.com

unread,
Sep 15, 2011, 7:58:36 AM9/15/11
to google-api-...@googlegroups.com
I have a similar problem with "picasa-android-sample", and I have the m2eclipse plugin installed. Two jars seems to be missing in my project, the others seems to be ok.

M2_REPO/com/google/apis-samples/shared-sample-gdata/1.0.0/shared-sample-gdata-1.0.0.jar
M2_REPO/com/google/apis-samples/shared-sample-picasa/v2-1.0.0/shared-sample-picasa-v2-1.0.0.jar


--

Helder Martins

Yaniv Inbar (יניב ענבר)

unread,
Nov 11, 2011, 4:37:58 PM11/11/11
to google-api-...@googlegroups.com
Thanks for all of the feedback.

Today I fixed all of the Android samples to use Maven properly.  We now ask you to upgrade to Eclipse 3.7 (Indigo), which has a newer version of the Maven plugin.  You should not be getting any more missing jar errors if you have Maven installed.

Please note that most of the samples require you to first 'mvn install' a shared sample library.  Take a look at the instructions.html file for the sample you are interested in for the Maven instructions.  They are required for the samples, even if you are using Eclipse:


I understand this can be unintuitive, especially if you are unfamiliar with Maven.  If you have any idea of how we might be able to simplify the samples set up instructions, please let us know.  Please also let us know if you are running into other Android sample set up problems.

Yaniv Inbar
Senior Software Engineer
Google Inc.

Matt Powell

unread,
Dec 12, 2011, 12:13:07 PM12/12/11
to google-api-...@googlegroups.com
Hi,

I have followed the instructions exactly except using the Maven plugin from: Maven - http://download.eclipse.org/technology/m2e/releases instead of the suggested: http://m2eclipse.sonatype.org/sites/m2e

But i am getting a bunch of compile errors in Eclipse AND if i try and compile via Maven cmdline.

Pasted below but the stackoverflow formatting might be easier to read: http://stackoverflow.com/questions/8477791/android-google-calendar-api-sample-compile-error

Any idea what is happening?

Description    Resource    Path    Location    Type
 
CalendarAndroidRequestInitializer cannot be resolved to a type CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 104    Java Problem
 
CalendarAndroidRequestInitializer cannot be resolved to a type CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 150    Java Problem
CalendarAndroidRequestInitializer cannot be resolved to a type  CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 150    Java Problem
 
CalendarAndroidRequestInitializer cannot be resolved to a type CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 151    Java Problem
 
CalendarAndroidRequestInitializer cannot be resolved to a type CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 163    Java Problem
 
CalendarAndroidRequestInitializer cannot be resolved to a type CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 172    Java Problem
CalendarAndroidRequestInitializer cannot be resolved to a type  CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 179    Java Problem
Constructor call must be the first statement in a constructor   CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 111    Java Problem
Return type for the method is missing   CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 110        Java Problem
The constructor CalendarRequestInitializer(HttpTransport) refers to the missing type HttpTransport  CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 106    Java Problem
The hierarchy of the type CalendarAndroidRequestInitialize is inconsistent  CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 106    Java Problem
The method getPathParts() is undefined for the type CalendarUrl CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 374    Java Problem
The method getPathParts() is undefined for the type CalendarUrl CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 380    Java Problem
The method getPathParts() is undefined for the type CalendarUrl CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 381    Java Problem
The method getPathParts() is undefined for the type CalendarUrl CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 387    Java Problem
 
The method getPathParts() is undefined for the type CalendarUrl    CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 388    Java Problem
The method handleResponse(HttpRequest, HttpResponse, boolean) from the type CalendarRequestInitializer refers to the missing type HttpRequest   CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 127    Java Problem
The method handleResponse(HttpRequest, HttpResponse, boolean) of type     CalendarSample.CalendarAndroidRequestInitialize must override a superclass method CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 123    Java Problem
The method intercept(HttpRequest) from the type CalendarRequestInitializer refers to the missing type HttpRequest   CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 118    Java Problem
The method intercept(HttpRequest) of type CalendarSample.CalendarAndroidRequestInitialize must override a superclass method CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 117    Java Problem
The method setApplicationName(String) is undefined for the type CalendarClient  CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 153    Java Problem
The method setPrettyPrint(boolean) is undefined for the type CalendarClient CalendarSample.java /calendar-android-sample/src/main/java/com/google/api/client/sample/calendar/android    line 152    Java Problem

android developer

unread,
Mar 2, 2012, 11:26:39 PM3/2/12
to google-api-...@googlegroups.com
Hi Luke,
I m also facing same problem, you got any solution please update me
same problem u mentioned
Missing artifact com.google.apis-samples:shared-sample-
calendar:jar:v2-1.0.0:compile
Thanks
Neer

android developer

unread,
Mar 2, 2012, 11:31:20 PM3/2/12
to google-api-...@googlegroups.com
Hi,
I want to run calendar sample but i am getting following error:--- Missing artifact com.google.apis-samples:shared-sample-
calendar:jar:v2-1.0.0:compile
i also installed maven plugin but still giving....i am installing
this plugin link http://download.eclipse.org/technology/m2e/releases/1.0/1.0.0.20110607-2117 please update if i am doing wrong...
 
Thanks
Neer

Ravi Mistry

unread,
Mar 5, 2012, 10:30:10 AM3/5/12
to google-api-...@googlegroups.com
Hello Neer,

As Yaniv mentioned earlier in this thread most of the samples require you to first 'mvn install' a shared sample library.

Please take a look at the instructions.html of calendar-android-sample:

cd [someDirectory]
hg clone https://code.google.com/p/google-api-java-client.samples/ google-api-java-client-samples
cd google-api-java-client-samples/shared/gdata/shared-sample-gdata
mvn source:jar install
cd ../shared-sample-calendar
mvn source:jar install

Thank you,
Ravi

Yaniv Inbar (יניב ענבר)

unread,
Mar 12, 2012, 11:34:21 PM3/12/12
to google-api-...@googlegroups.com
We updated the calendar-android-sample to use the new Calendar library.  It should hopefully be much easier to use and set up.  Please take a look and let me know if it works better for you:


Yaniv Inbar
Senior Software Engineer
Google Inc.


Reply all
Reply to author
Forward
0 new messages