Building ODK from source: Errors in ADT, GeoPointMapActivity.java

ODeeKers,

Working on building ODK from source and have run into a funky problem in
the ADT version of Eclipse.

I have a fresh version of ADT/Eclipse. Newest android SDK.
I cloned the most recent ODK Collect from the Repo.

Upon running eclipse, it complains:
[2014-04-07 16:35:04 - ODK Collect] Unable to resolve target 'Google
Inc.:Google APIs:19

So, I have used the SDK Manager to install API 19.

This allows you to import the project into Eclipse, but when you do, you
end up with quite a lot of errors.

I managed to fix 100+ errors by changing the “Build Target” from “Android
1.x to Google APIs 19” , and then using Project / Clean, Refresh, and Build.

I am still left with 679 errors, but this is just the first of them:

Description Resource Path Location Type

CameraUpdateFactory cannot be resolved GeoPointMapActivity.java /ODK
Collect/src/org/odk/collect/android/activities line 342 Java Problem

So, I am thinking that this is an issue that will be resolved if I install
the right API using the SDK manager, or maybe select the right Target. I
can't imaging that I will have to add each of these 679 missing resources,
and I imagine that I am not the only person to run into this issue. Is it
necessary to have other older APIs installed? Is it something about the
Java Build Path. Help me, Obi Wan Kenobi, you're my only hope.

Neil,

Make sure you have the Google Play Services extra installed as well. Then
quit and re-open Eclipse.

If that fails, switch to IntelliJ.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Mon, Apr 7, 2014 at 3:36 PM, m0j0 TeXas mojotexas@gmail.com wrote:

ODeeKers,

Working on building ODK from source and have run into a funky problem in
the ADT version of Eclipse.

I have a fresh version of ADT/Eclipse. Newest android SDK.
I cloned the most recent ODK Collect from the Repo.

Upon running eclipse, it complains:
[2014-04-07 16:35:04 - ODK Collect] Unable to resolve target 'Google
Inc.:Google APIs:19

So, I have used the SDK Manager to install API 19.

This allows you to import the project into Eclipse, but when you do, you
end up with quite a lot of errors.

I managed to fix 100+ errors by changing the "Build Target" from
"Android 1.x to Google APIs 19" , and then using Project / Clean,
Refresh, and Build.

I am still left with 679 errors, but this is just the first of them:

Description Resource Path Location Type

CameraUpdateFactory cannot be resolved GeoPointMapActivity.java /ODK
Collect/src/org/odk/collect/android/activities line 342 Java Problem

So, I am thinking that this is an issue that will be resolved if I install
the right API using the SDK manager, or maybe select the right Target. I
can't imaging that I will have to add each of these 679 missing resources,
and I imagine that I am not the only person to run into this issue. Is it
necessary to have other older APIs installed? Is it something about the
Java Build Path. Help me, Obi Wan Kenobi, you're my only hope.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Good advice. I did check that Google Play services were installed. Did a
lot of clean/restart Eclipse. No dice.
So, I went ahead and installed IntelliJ. Nice interface, similar to
Eclipse, but less crufty I think. Still, I have a lot of the same errors.
​I paste a few lines of the errors here:

Error:(40, 35) java: package com.google.android.gms.maps does not exist

Error:(41, 35) java: package com.google.android.gms.maps does not exist

Error:(42, 45) java: package com.google.android.gms.maps.GoogleMap does not

exist

Error:(43, 45) java: package com.google.android.gms.maps.GoogleMap does not

exist

​IntelliJ has the same kind of integration for the SDK manager, so I am
attaching here a cap of the installed bits. What am I missing?
​[image: Inline image 1]​

☞§※☼:airplane::open_umbrella::slight_smile:
~Neil

··· On Mon, Apr 7, 2014 at 7:32 PM, Yaw Anokwa wrote:

Neil,

Make sure you have the Google Play Services extra installed as well. Then
quit and re-open Eclipse.

If that fails, switch to IntelliJ.

Yaw

Need ODK services? http://nafundi.com provides form design, server setup,
professional support, and software development for ODK.

Neil,

You've gotta add the Play Services project as a dependent module to
Collect. Then also include the Play Services lib.

http://www.jfarrell.net/2013/09/intellij-and-google-maps.html has a
good overview of how to do this.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

And by the google play services project, we mean
http://code.google.com/p/opendatakit/source/browse?repo=playservices

··· On Tue, Apr 8, 2014 at 9:08 AM, Yaw Anokwa wrote:

Neil,

You've gotta add the Play Services project as a dependent module to
Collect. Then also include the Play Services lib.

http://www.jfarrell.net/2013/09/intellij-and-google-maps.html has a
good overview of how to do this.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Now we are putting the Fun in Nafundi!
Thanks, that worked and allowed me to get past the errors, though there are
still a lot of warnings (139!). In the past, we haven't worrried about
these, so I am just moving ahead without worrying about the warnings.

☞§※☼:airplane::open_umbrella::slight_smile:
~Neil

··· On Tue, Apr 8, 2014 at 12:08 PM, Yaw Anokwa wrote:

Neil,

You've gotta add the Play Services project as a dependent module to
Collect. Then also include the Play Services lib.

http://www.jfarrell.net/2013/09/intellij-and-google-maps.html has a
good overview of how to do this.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/PEjl-rM5Z94/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mitch,
Good tip! I already added the google play services as downloaded from the
SDK manager. Is that OK, or is the ODK Google Play Services special and
different?

☞§※☼:airplane::open_umbrella::slight_smile:
~Neil

··· On Tue, Apr 8, 2014 at 1:34 PM, Mitch Sundt wrote:

And by the google play services project, we mean
http://code.google.com/p/opendatakit/source/browse?repo=playservices

On Tue, Apr 8, 2014 at 9:08 AM, Yaw Anokwa yanokwa@nafundi.com wrote:

Neil,

You've gotta add the Play Services project as a dependent module to
Collect. Then also include the Play Services lib.

http://www.jfarrell.net/2013/09/intellij-and-google-maps.html has a
good overview of how to do this.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/PEjl-rM5Z94/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

The play services from the SDK revs slightly with every SDK update.
The authoritative build is with the one from that project, which we update
on our schedule, not Google's.

We also may have fiddled with some of the Android Lint settings of that
project to more easily get a signed APK; the dev environment doesn't
complain about many issues, but when you generate the signed APK, it can
sometimes crash and refuse to produce one.

··· On Tue, Apr 8, 2014 at 12:21 PM, Neil Hendrick wrote:

Mitch,
Good tip! I already added the google play services as downloaded from the
SDK manager. Is that OK, or is the ODK Google Play Services special and
different?

☞§※☼:airplane::open_umbrella::slight_smile:
~Neil

On Tue, Apr 8, 2014 at 1:34 PM, Mitch Sundt mitchellsundt@gmail.comwrote:

And by the google play services project, we mean
http://code.google.com/p/opendatakit/source/browse?repo=playservices

On Tue, Apr 8, 2014 at 9:08 AM, Yaw Anokwa yanokwa@nafundi.com wrote:

Neil,

You've gotta add the Play Services project as a dependent module to
Collect. Then also include the Play Services lib.

http://www.jfarrell.net/2013/09/intellij-and-google-maps.html has a
good overview of how to do this.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/PEjl-rM5Z94/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com