failed resolving googleplayservices

折月煮酒 提交于 2020-01-04 09:12:20

问题


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!


回答1:


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.



来源:https://stackoverflow.com/questions/17164632/failed-resolving-googleplayservices

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!