statusCode=DEVELOPER_ERROR in google login
<p>Below code I am using for Google login.I  added <code>google-services.json</code> file in the app folder.I am using <code>classpath 'com.google.gms:google-services:2.0.0</code>' in root gradle module.I have checked my package at developer console and its correct and I added SHA1 key which i got by running command <code>keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android</code> on terminal(i am using ubuntu).I have enable Google+ API.I have created OAuth consent screen andOAuth client id.Still i get below error when i try to login with google- </p>

<blockquote>
  <p>{statusCode=DEVELOPER_ERROR, resolution=null}</p>
</blockquote>

<p>I check similar question but couldn't find appropriate solution.
Code</p>

<pre><code>GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN).requestProfile().requestId()
            .requestEmail().requestScopes(new Scope(Scopes.PLUS_ME))
            .requestScopes(new Scope(Scopes.PLUS_LOGIN))
            .build();
    mGoogleApiClient = new GoogleApiClient.Builder(this)
            .enableAutoManage(this, this /* OnConnectionFailedListener */)
            .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
            .build();

    googleButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
    Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);
    startActivityForResult(signInIntent, RC_SIGN_IN);

    }
    });

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == RC_SIGN_IN) {
            GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
            handleSignInResult(result);
        } 
    }
    private void handleSignInResult(GoogleSignInResult result) {
        if (result.isSuccess()) {
            // Signed in successfully, show authenticated UI.
            GoogleSignInAccount acct = result.getSignInAccount();

        } else {
            // Signed out, show unauthenticated UI.
            // updateUI(false);
        }
    }
    @Override
    protected void onStart() {
        super.onStart();
        mGoogleApiClient.connect();
    }
    @Override
    protected void onStop() {
        super.onStop();
        if(mGoogleApiClient.isConnected())
        {
            mGoogleApiClient.disconnect();
        }
    }
    @Override
    protected void onResume() {
        super.onResume();
        if(mGoogleApiClient.isConnected())
        {
            mGoogleApiClient.connect();
        }
    }
</code></pre>

<p>Manifest</p>

<pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
   &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
    &lt;!-- To use account credentials --&gt;
    &lt;uses-permission android:name="android.permission.USE_CREDENTIALS" /&gt;
  &lt;meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" /&gt;
</code></pre>