can not find the class of symbols & ldquo; Builder & rdquo;
source link: https://www.codesd.com/item/can-not-find-the-class-of-symbols-builder.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
can not find the class of symbols & ldquo; Builder & rdquo;
I have recently downloaded Android Studio
, I thought it has more features than eclipse
.
I created a new project, with a log in activity, but it seems there is an error with the activity :![enter image description here][1]
**Error:(78, 31) error: cannot find symbol class Builder
Error:Execution failed for task ':app:compileDebugJava'.
> Compilation failed; see the compiler error output for details.**
import com.google.android.gms.plus.PlusClient;
// This is the helper object that connects to Google Play Services.
private PlusClient mPlusClient;
@Override
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).setScopes(Scopes.PLUS_LOGIN,
Scopes.PLUS_ME).build();
}
It is a duplicate of Unable to build PlusClient and can not find symbol class Builder
For Quick Reference: The issue is that the PlayClient is deprecated now but the template still uses the old way.
Thus, you can:
- Change the play services version in the gradle dependencies (
build.gradle
) fromcom.google.android.gms:play-services:6.5.87
tocom.google.android.gms:play-services:6.1.71
.
OR
Use the new way as described here:http://android-developers.blogspot.in/2014/02/new-client-api-model-in-google-play.html i.e, instead of creating the instance of
PlusClient.Builder
create an instance ofGoogleApiClient.Builder
as shown:// Builds single client object that connects to Drive and Google+ import com.google.android.gms.common.api.GoogleApiClient; mClient = new GoogleApiClient.Builder(this) .addApi(Drive.API) .addScope(Drive.SCOPE_FILE) .addApi(Plus.API, plusOptions) .addScope(Plus.SCOPE_PLUS_LOGIN) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build();
Recommend
-
12
Magento: & ldquo; Image does not exist & rdquo; advertisements I'm importing a CSV file in Magento (version 1.9). I receive...
-
8
& ldquo; azure & rdquo; not recognized in Azece powershell advertisements For the first time I'm trying out Azure Powershell. I'm sele...
-
6
How to know when all promises are resolved in a dynamic & ldquo; iterable & rdquo; parameter? advertisements My problem is that I don't kno...
-
8
VHDL: signals and ports on which side of & ldquo; arrow & rdquo; = & gt; advertisements very basic question: How do I know...
-
9
1004 error & ldquo; Is it possible that it has been moved, renamed or deleted? & Rdquo; advertisements My goal: make Excel save a copy...
-
5
How to use & ldquo; Consistency & rdquo; Java api parameter when setting elastic search data advertisements I have used "consistency"...
-
25
Why do I need to & ldquo; C & rdquo; In front of the class name in C ++ advertisements Possible Duplicate:
-
3
HTML5: Input additional characters with type = & ldquo; Number & rdquo; advertisements In our app, we have many inputs that are used t...
-
7
Where is & ldquo; Code as data & rdquo; In DLR expression? advertisements I have this c# code: Console.Writeline("Hello Worl...
-
2
Why VBA says it & ldquo; (Not in response) & rdquo; Even when the code works well? advertisements I've run into this issue with many d...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK