2

I am trying to create an android application that is location aware using google play services as it seems that is the new recommended fashion for doing this. I have used the tutorial I found on the android developers site to setup my project. It seems correct and builds fine, however, when the activity just BEFORE the activity that has the google play services dependencies starts I see the following in log cat.

06-18 01:31:04.126: I/dalvikvm(30480): Failed resolving Lcom/example/activities/NewActivity; interface 1045 'Lcom/google/android/gms/common/GooglePlayServicesClient$ConnectionCallbacks;'
06-18 01:31:04.126: W/dalvikvm(30480): Link of class 'Lcom/example/activities/NewActivity;' failed
06-18 01:31:04.126: W/dalvikvm(30480): Unable to resolve superclass of Lcom/example/activities/NewActivity_; (930)
06-18 01:31:04.126: W/dalvikvm(30480): Link of class 'Lcom/example/activities/NewActivity_;' failed
06-18 01:31:04.126: E/dalvikvm(30480): Could not find class 'com.example.activities.NewActivity_', referenced from method com.example.activities.HomeActivity.clickCurrentDonation
06-18 01:31:04.126: W/dalvikvm(30480): VFY: unable to resolve const-class 936 (Lcom/example/activities/NewActivity_;) in Lcom/example/activities/HomeActivity;

Here NewActivity is the activity using google play services that is unable to load and HomeActivity is the activity that calls NewActivity. These errors appear on load of the HomeActivity even before I try to start NewActivity.

I have confirmed that this works normally if I do not include the google play services code.

The only thing I am doing that seems to be different than the norm or than the tutorial is that I am using the android-annotations project which is why you'll see references above to the NewActivity_ which is a generated class this uses based on the code I write in the base class.

Has anyone else encountered this or have any idea how to resolve?

Thanks for any help!

feanor114
  • 85
  • 3
  • 12
  • Same issue for me. Did you finally solve it? – Maxime Chéramy Aug 31 '13 at 18:23
  • Sorta, I rebuilt the new activity that was causing the error from scratch again piece by piece and it started working for me though I wasn't able to figure out what might have been the meaningful difference from my original implementation. – feanor114 Sep 07 '13 at 06:14
  • Sounds like a lot of fun :). Thanks anyway, I'll try your method when I'll find the time. – Maxime Chéramy Sep 10 '13 at 14:08
  • I am facing the same problem ..after updating the sdk Its causing me the same problem ..even last working projects also started giving this error ...any solution for this ? – Jambaaz Aug 23 '14 at 15:44

1 Answers1

2

Just re install the Google Play services from SDK Manager and try to link again and clean- build the project.

If still It does not work, download another SDK folder and install Google Play Services and import the Google Play Services project in your workspace and link to your current project.

I don't knw..Its quite strange But It worked for me.

Jambaaz
  • 2,788
  • 1
  • 19
  • 30