问题
I am using Google Play Service's Authorization with GoogleAuthUtil in my Android applcation. I did this part about 2 months back, its been working perfectly fine then onwards. Yesterday, I updated the SDK. Now I am getting this error in my application. It says "GoogleAuthUtil cannot be resolved".
Has anything changed in the updated SDK?
How can I solve this?
I am importing the following:
import com.google.android.gms.auth.GoogleAuthException;
import com.google.android.gms.auth.GoogleAuthUtil;
import com.google.android.gms.auth.GooglePlayServicesAvailabilityException;
import com.google.android.gms.auth.UserRecoverableAuthException.
I am getting
com.google.android.gms.auth cannot be resolved.
回答1:
Whenever you update any library make sure to first remove it from your references and again add it to your references. After that clean the project. Restart Eclipse if needed. And I feel then you are good to go!! :)
回答2:
Just remove the <uses-library>
tag from your AndroidManifest.xml and restart and clean everything. For sure it will start running.
回答3:
If you are using Android Studio follow step below.
- Open
SDK Manager
->SDK Tool
-> click onGoogle Play
service and Apply - Open
Module Setting
orProject Structure
-> onDependencies
tab click on+
button -> select1.Library Dependency
->Selectplay-services (...)
then click OK - Clean your project by
Build
->Clean Project
来源:https://stackoverflow.com/questions/15665255/googleauthutil-cannot-be-resolved