CHJani / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

mvn compile of tasks-android-sample fails #300

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Version of google-api-java-client (e.g. 1.5.0-beta)?
1.5.0-beta

Java environment (e.g. Java 6, Android 2.3, App Engine)?
Java 6, Android 2.3

Describe the problem.

When following the checkout instructions here:
http://samples.google-api-java-client.googlecode.com/hg/tasks-android-sample/ins
tructions.html

mvn compile results in:

[INFO] 2 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.244s
[INFO] Finished at: Fri Sep 23 14:00:50 PDT 2011
[INFO] Final Memory: 5M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) 
on project tasks-android-sample: Compilation failure: Compilation failure:
[ERROR] 
<My_Path>/tasks-android-sample/src/main/java/com/google/api/services/samples/tas
ks/android/TasksSample.java:[221,53] package R does not exist
[ERROR] 
<My_Path>/tasks-android-sample/src/main/java/com/google/api/services/samples/tas
ks/android/TasksSample.java:[225,20] package R does not exist

The same problem also happens for the calendar android sample:
http://samples.google-api-java-client.googlecode.com/hg/calendar-android-sample/
instructions.html

This problem has also been reported in stackoverflow:
http://stackoverflow.com/questions/7457521/fixing-dependency-for-google-api-task
-android-sample

How would you expect it to be fixed?

mvn compile in 
http://samples.google-api-java-client.googlecode.com/hg/tasks-android-sample/ins
tructions.html
should work with no compilation errors.
This is probably going to require figuring out the maven way of doing android.

Original issue reported on code.google.com by rmis...@google.com on 23 Sep 2011 at 9:12

GoogleCodeExporter commented 9 years ago
tasks-android-sample has been fixed.
Working on calendar and picasa samples now.

Original comment by yan...@google.com on 11 Nov 2011 at 2:15

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 11 Nov 2011 at 9:56

GoogleCodeExporter commented 9 years ago

Hi When i try to use 
http://samples.google-api-java-client.googlecode.com/hg/tasks-android-sample/ins
tructions.html

I got this error in console

Dx warning: Ignoring InnerClasses attribute for an anonymous inner class 
(org.mortbay.jetty.nio.SelectChannelConnector$1) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is not an inner class.

[2012-09-25 18:26:21 - TaskTests] Dx 1 error; aborting [2012-09-25 18:26:21 - 
TaskTests] Conversion to Dalvik format failed with error 1

When I see in Error log there is nothing.

Can anyone tell me what is happening here?

Original comment by umer.abi...@gmail.com on 25 Sep 2012 at 1:34

GoogleCodeExporter commented 9 years ago
Maven compile for Android samples is not supported any more.  It was too 
difficult to maintain and it doesn't work well with Google's Android Eclipse 
plugin.

Original comment by yan...@google.com on 25 Sep 2012 at 2:12