android google play service

Actually i am new android user currently facing one problem from a while this is the link where u can see the code provided by google. its showing me red line on GoogleAuthUtil in eclipse. please help me out.

   private String[] getAccountNames() {
    AccountManager mAccountManager = AccountManager.get(this);
    Account[] accounts = mAccountManager.getAccountsByType(
            GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE);
    String[] names = new String[accounts.length];
    for (int i = 0; i < names.length; i++) {
        names[i] = accounts[i].name;
    }
    return names;
}

Answers


You have to follow this tutorial to setup Google Play Services in your project.

After that, you can import GoogleAuthUtil normally.


Sayed.jalil:-

its showing "Google.AuthUtil cannot be resolved" and its also giving error in import statement.. import com.google.android.gms.auth.GoogleAuthUtil; showing red line on "com.google" nd error is "the import com.google cannot be resolved"


Need Your Help

Outlook Drag and Drop - ActiveExplorer().Selection() doesn't contain all items

c# outlook vsto outlook-addin outlook-redemption

In my Outlook add-in, I'm attempting to obtain information on all items that are dragged and dropped by the user into a MAPI store (I'm using the Redemption library).

Gitolite Error: gitolite-admin not a repo

linux git gitolite

Quick Note: Before anyone points it out, I did originally post this on Server Fault, but after doing so I realized this site may be more appropriate. Sorry for the "double post".

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.