GooglePlusUtil cannot be resolved (Android)

I have an Android 2.2 target library project that MyLibraryGooglePlusSocialPlugin.java could not compile import com.google.android.gms.plus.GooglePlusUtil; ( GooglePlusUtil cannot be resolved ), and others are in order:

 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 updated Google related services through the Android SDK manager today and set the build path and dependencies.

+4
source share
4 answers

The GooglePlusUtils class has been deleted because it is no longer needed. All existing error handling functions have been integrated in a way that does not require developer intervention.

As an example of how you can move from using this (now deprecated) class, see the following change in the example with the Google+ Photohunt Android client, which fixes the problem:

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

+9
source

Their documentation has not changed on the Internet, but it is really missing from the bank. I would like to find a copy of the latest version and use it now.

** UPDATE ** You can do the same with GooglePlayServicesUtil and check if the user has the correct package name for Google Plus.

+1
source

I am working on this by downgrading to a previous version, where AndroidManifest.xml in google-play-services_lib looks 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 the lower version that was saved on my local drive. I don’t know how to go through the Android SDK manager.

+1
source

The old GooglePlusUtil + error codes are no longer needed, because even if the device has not installed the GooglePlus application, GooglePlay services provide a connection to the user account. You can only check if GooglePlay services are present and updated using GooglePlayServicesUtil.isGooglePlayServicesAvailable and hide the user interface field using GooglePlus. Otherwise, a user account (GooglePlus) will be created.

-one
source

Source: https://habr.com/ru/post/1496475/


All Articles