java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.testgoogleapi/com.example.testgoogleapi.ActivityMain}: java.lang.IllegalStateException: Must not set scopes in GoogleApiClient.Builder when using Auth.GOOGLE_SIGN_IN_API. Set account in GoogleSignInOptions.Builder instead.


Solutions on the web17687

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.example.testgoogleapi/com.example.testgoogleapi.ActivityMain}: java.lang.IllegalStateException: Must not set scopes in GoogleApiClient.Builder when using Auth.GOOGLE_SIGN_IN_API. Set account in GoogleSignInOptions.Builder instead.

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.rrr.seasonsgreetings/com.rrr.seasonsgreetings.Greetings}: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.

Solution icon of github
via GitHub by riyase
, 11 months ago
Unable to start activity ComponentInfo{com.uber.sdk.android.rides.samples/com.uber.sdk.android.rides.samples.SampleActivity}: java.lang.NullPointerException: Must set pick up point latitude in RideParameters.

Solution icon of stackoverflow
via Stack Overflow by Abhishek Singh
, 1 year ago
Unable to start activity ComponentInfo{com.example.jopendocs/com.example.jopendocs.JODActivity}: java.lang.IllegalStateException: officeHome not set and could not be auto-detected

Solution icon of web
via sitepoint.com by Unknown author, 1 year ago
Unable to start activity ComponentInfo{com.example.jopendocs/com.example.jopendocs.JODActivity}: java.lang.IllegalStateException: officeHome not set and could not be auto-detected

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.example.gamecik/com.example.gamecik.MainActivity}: java.lang.IllegalStateException: The ad unit ID can only be set once on AdView.

Solution icon of github
Unable to start activity ComponentInfo{pt.org.adventistas.infoUPASD/org.appcelerator.titanium.TiTranslucentActivity}: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.widget.AbsListView

Solution icon of github
Unable to start activity ComponentInfo{org.wordpress.android/org.wordpress.android.ui.posts.EditPostActivity}: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.view.View$BaseSavedState instead

Solution icon of web
via bing.com by Unknown author, 1 year ago
Unable to start activity ComponentInfo{it.gmariotti.android.example.navigationdrawer/com.tdl.filemannavdrawer.MainActivity}: java.lang.IllegalStateException: System services not available to Activities before onCreate()

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.antech.kefilm/com.antech.kefilm.NewClass}: java.lang.IllegalStateException

Stack trace

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.testgoogleapi/com.example.testgoogleapi.ActivityMain}: java.lang.IllegalStateException: Must not set scopes in GoogleApiClient.Builder when using Auth.GOOGLE_SIGN_IN_API. Set account in GoogleSignInOptions.Builder instead.
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
	at android.app.ActivityThread.access$700(ActivityThread.java:140)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4921)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
	at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: Must not set scopes in GoogleApiClient.Builder when using Auth.GOOGLE_SIGN_IN_API. Set account in GoogleSignInOptions.Builder instead.
	at com.google.android.gms.common.internal.zzx.zza(Unknown Source)
	at com.google.android.gms.common.api.GoogleApiClient$Builder.zzoZ(Unknown Source)
	at com.google.android.gms.common.api.GoogleApiClient$Builder.build(Unknown Source)
	at com.example.testgoogleapi.ActivityMain.buildGoogleApiClient(ActivityMain.java:81)
	at com.example.testgoogleapi.ActivityMain.onCreate(ActivityMain.java:458)
	at android.app.Activity.performCreate(Activity.java:5206)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
	... 11 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

10 times, 7 months ago
3 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 times, 1 year ago
4 more bugmates