I am using loginActivity in android.
ERROR
can not find symbol class Builder
I have also imported the file: com.google.android.gms.plus.PlusClient
Error on this line
mPlusClient = new PlusClient.Builder(this, this, this).setScopes(Scopes.PLUS_LOGIN, Scopes.PLUS_ME).build();
This is auto generated file from template. What could be the reason for this error?
EDIT
I am using android studio
minSdkVersion 11
targetSdkVersion 21
In the above program, "Cannot find symbol" error will occur because “sum” is not declared. In order to solve the error, we need to define “int sum = n1+n2” before using the variable sum.
The cannot find symbol error, also found under the names of symbol not found and cannot resolve symbol , is a Java compile-time error which emerges whenever there is an identifier in the source code which the compiler is unable to work out what it refers to.
I solved in my project by downgrading play-services to:
compile 'com.google.android.gms:play-services:6.1.71'
in dependencies in gradle file.
It is not available because it is deprecated. Use GoogleApiClient instead.
Start integrating Google+ : This is the official documentation for implementing Google+ client in your Android app for login and other requirements. Please follow this and not the auto-generated code from Android studio (until the code gets updated with newer implementation).
P.S. The other answer suggests to use older version of PlusClient, which is a wrong approach. You should be using newer code Instead of using older play services.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With