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 web52510

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.example.mette.googleapitest/com.example.mette.googleapitest.MainActivity}: 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
via Stack Overflow by Chimi
, 1 year ago
Unable to start activity ComponentInfo{com.example.componenttest/com.example.componenttest.AndroidWebActivity}: java.lang.IllegalStateException: Target host must not be null, or set in parameters.

Solution icon of stackoverflow
via Stack Overflow by user2214618
, 1 year ago
Unable to start activity ComponentInfo{com.taseen.apps/com.taseen.apps.TestExternalDatabaseActivity}: java.lang.IllegalStateException: Target host must not be null, or set in parameters.

Solution icon of github
via GitHub by Zspecial
, 1 year ago
Unable to start activity ComponentInfo{at.xtools.castcontroller.android/com.google.android.libraries.cast.companionlibrary.cast.player.VideoCastControllerActivity}: java.lang.IllegalStateException: This Activity already has an action bar supplied by

Solution icon of github
Unable to start activity ComponentInfo{de.danoeh.antennapod/de.danoeh.antennapod.activity.MainActivity}: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.

Solution icon of github
Unable to start activity ComponentInfo{com.owncloud.android.beta/com.owncloud.android.ui.activity.Uploader}: 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 web
via JIRA by alastair antonio, 1 year ago
Unable to start activity ComponentInfo{org.cyanogenmod.theme.chooser/org.cyanogenmod.theme.chooser.ChooserActivity}: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR and set android:windowActionBar to false in your theme to use a Toolbar instead.

Solution icon of web
via JIRA by alastair antonio, 1 year ago
Unable to start activity ComponentInfo{org.cyanogenmod.theme.chooser/org.cyanogenmod.theme.chooser.ChooserActivity}: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR and set android:windowActionBar to false in your theme to use a Toolbar instead.

Solution icon of stackoverflow
via Stack Overflow by DanKCl
, 1 year ago
Unable to start activity ComponentInfo{com.example.toolbar/com.example.toolbar.ToolbarActivity}: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.

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, 5 months ago
3 times, 10 months 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