I am using Android Studio.
I need to use Google accounts, but I get an error.
Cannot resolve symbol 'GoogleAuthUtil'
I have imported four major imports.
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;
This is what I call him.
final Account[] accounts = mAccountManager.getAccountsByType(GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE);
There are the following in my AndroidManifest.xml.
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="18" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.NETWORK" />
I selected the Android 4.3 (version 18) Google API when starting my project.
Should I have GooglePlayServices.jar in my libs folder? How to do it in Android Studio?
I tried restarting Android Studio, trying to follow the steps in this other Eclipse question: GoogleAuthUtil could not be resolved .
source share