GoogleAuthUtil cannot be resolved

六眼飞鱼酱① 提交于 2019-12-12 20:23:12

问题


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.

  1. Open SDK Manager -> SDK Tool -> click on Google Play service and Apply
  2. Open Module Setting or Project Structure -> on Dependencies tab click on + button -> select 1.Library Dependency ->Select play-services (...) then click OK
  3. Clean your project by Build -> Clean Project


来源:https://stackoverflow.com/questions/15665255/googleauthutil-cannot-be-resolved

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