can not find symbol class Builder

2

I created a project in Android Studio 1.0, Login Activity.

I made the following changes: No Build.gradle

compileSdkVersion 21        
buildToolsVersion "21.1.1"  

dependencies {                                                      
compile fileTree(include: ['*.jar'], dir: 'libs')               
compile 'com.android.support:appcompat-v7:21.0.2'               
compile 'com.google.android.gms:play-services:6.5.87'           
compile 'com.google.android.gms:play-services-plus:6.5.+'       
compile 'com.google.android.gms:play-services-identity:6.5.+'   
compile files('libs/google-play-services.jar')                  
compile files('libs/android-support-v4.jar')                    
}                                                                   

I have a class called LoginActivity.java and another PlusBaseActivity.java

The class PlusBaseActivity.java, displays the following error:

can not find symbol class Builder

Part of the code that contains the error:

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Initialize the PlusClient connection.
    // Scopes indicate the information about the user your application will be able to access.
    mPlusClient =
            new PlusClient.Builder(this, this, this).
                    setVisibleActivities("http://schemas.google.com/AddActivity", "http://schemas.google.com/CheckInActivity")
                    .setScopes(Scopes.PLUS_LOGIN,
                    Scopes.PLUS_ME).build();
}

I've researched the internet and I have not found the solution yet, any tips how to solve this problem?

    
asked by anonymous 11.12.2014 / 21:19

1 answer

2

I searched the subject, found that PlusClient is no longer deprecated, if you still want to use it, use an earlier version of the API like this:

>
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:21.0.2'
    compile 'com.google.android.gms:play-services:6.1.71'
    compile 'com.android.support:support-v4:21.0.0'
}

I encourage you to look for more information about GoogleApiClient because it is a unified API that allows integration with Google Play services.

References

can not find symbol class Builder
New Client API Model in Google Play Services > Setting Up Google Play Services
Accessing Google APIs

    
31.12.2014 / 14:18