Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GooglePlusUtil cannot be resolved (Android)

I have an Android 2.2 targeted library project, whose MyLibraryGooglePlusSocialPlugin.java has a import com.google.android.gms.plus.GooglePlusUtil; being failed to compile (GooglePlusUtil cannot be resolved), while others are okay:

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesClient;
import com.google.android.gms.common.Scopes;
import com.google.android.gms.plus.PlusClient;
import com.google.android.gms.plus.PlusClient.OnPeopleLoadedListener;
import com.google.android.gms.plus.PlusClient.OnPersonLoadedListener;
import com.google.android.gms.plus.PlusShare;
import com.google.android.gms.plus.model.people.Person;
import com.google.android.gms.plus.model.people.PersonBuffer;

I've updated the related Google services through Android SDK manager today, and set the build path and dependencies.

like image 296
George Avatar asked Dec 25 '22 22:12

George


2 Answers

The GooglePlusUtils class has been removed because you no longer need it. All of the existing error handling functionality has been integrated in a way that doesn't require developer intervention.

As an example of how you can migrate from using this (now deprecated) class, see the following change from the Google+ Photohunt Android client sample that resolves the issue:

https://github.com/gguuss/gplus-photohunt-client-android/commit/090c22b4721fde6859361aca210823822c218da8

like image 177
class Avatar answered Jan 09 '23 15:01

class


I work it around by downgrading to a previous version where the AndroidManifest.xml in the google-play-services_lib goes like this:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.google.android.gms"
    android:versionCode="3159130"
    android:versionName="3.1.59 (744626-30)" >

    <uses-sdk android:minSdkVersion="8"/>

</manifest>

UPDATE

I downgrade the library by reloading a lower version that was saved in my local disk. No idea how to downgrade through Android SDK manager.

like image 39
George Avatar answered Jan 09 '23 15:01

George