title: ClassNotFoundException for SignInConfiguration when signing in with Google
body: <p>I'm implementing Google login to an app. The login itself seems to work okay, but the moment I request either the user's e-mail or ID token I see the following stack trace in the log and the status from <code>GoogleSignInResult</code> as <code>Status{statusCode=unknown status code: 12500, resolution=null}</code></p>
  <pre><code>03-30 13:59:09.821 3634-4322/? E/Parcel: Class not found when unmarshalling: com.google.android.gms.auth.api.signin.internal.SignInConfiguration
   java.lang.ClassNotFoundException: com.google.android.gms.auth.api.signin.internal.SignInConfiguration
       at java.lang.Class.classForName(Native Method)
       at java.lang.Class.forName(Class.java:309)
       at java.lang.Class.forName(Class.java:273)
       at android.os.Parcel.readParcelableCreator(Parcel.java:2281)
       at android.os.Parcel.readParcelable(Parcel.java:2245)
       at android.os.Parcel.readValue(Parcel.java:2152)
       at android.os.Parcel.readArrayMapInternal(Parcel.java:2485)
       at android.os.BaseBundle.unparcel(BaseBundle.java:221)
       at android.os.BaseBundle.getString(BaseBundle.java:918)
       at android.content.Intent.getStringExtra(Intent.java:5767)
       at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:2365)
       at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1848)
       at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:5809)
       at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:5593)
       at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:142)
       at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3786)
       at android.os.Binder.execTransact(Binder.java:461)
    Caused by: java.lang.ClassNotFoundException: Didn't find class &quot;com.google.android.gms.auth.api.signin.internal.SignInConfiguration&quot; on path: DexPathList[[directory &quot;.&quot;],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
       at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
       at java.lang.Class.classForName(Native Method) 
       at java.lang.Class.forName(Class.java:309) 
       at java.lang.Class.forName(Class.java:273) 
       at android.os.Parcel.readParcelableCreator(Parcel.java:2281) 
       at android.os.Parcel.readParcelable(Parcel.java:2245) 
       at android.os.Parcel.readValue(Parcel.java:2152) 
       at android.os.Parcel.readArrayMapInternal(Parcel.java:2485) 
       at android.os.BaseBundle.unparcel(BaseBundle.java:221) 
       at android.os.BaseBundle.getString(BaseBundle.java:918) 
       at android.content.Intent.getStringExtra(Intent.java:5767) 
       at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:2365) 
       at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1848) 
       at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:5809) 
       at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:5593) 
       at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:142) 
       at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3786) 
       at android.os.Binder.execTransact(Binder.java:461) 
      Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.auth.api.signin.internal.SignInConfiguration
       at java.lang.Class.classForName(Native Method)
       at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
       at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
              ... 18 more
    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
  </code></pre>
  <p>This is the code I'm using for trying to log in the user:</p>
  <pre><code>public class SignInActivity extends AppCompatActivity implements GoogleApiClient.OnConnectionFailedListener {
  
      private final static String TAG = SignInActivity.class.getSimpleName();
  
      protected final static int REQUEST_CODE_GOOGLE_LOGIN = 1;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_sign_in);
  
          GoogleSignInOptions googleSignInOptions = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
  //                .requestEmail() // Causes ClassNotFoundException for SignInConfiguration
  //                .requestIdToken(getString(R.string.google_server_client_id)) // Causes ClassNotFoundException for SignInConfiguration
                  .build();
          final GoogleApiClient googleApiClient = new GoogleApiClient.Builder(this)
                  .enableAutoManage(this, this)
                  .addApi(Auth.GOOGLE_SIGN_IN_API, googleSignInOptions)
                  .build();
  
          SignInButton signInButton = (SignInButton) findViewById(R.id.signInButton);
          signInButton.setScopes(googleSignInOptions.getScopeArray());
          signInButton.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);
                  startActivityForResult(signInIntent, REQUEST_CODE_GOOGLE_LOGIN);
              }
          });
  
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
          if (requestCode == REQUEST_CODE_GOOGLE_LOGIN) {
              GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
              handleGoogleSignInResult(result);
          }
      }
  
      protected void handleGoogleSignInResult(GoogleSignInResult googleSignInResult) {
          Logging.debug(TAG, &quot;handleGoogleSignInResult(&quot; + googleSignInResult + &quot;)&quot;);
          if (googleSignInResult.isSuccess()) {
              GoogleSignInAccount googleSignInAccount = googleSignInResult.getSignInAccount();
              final String idToken = googleSignInAccount.getIdToken();
              if (idToken != null) {
                  Toast.makeText(SignInActivity.this, &quot;Successfully logged in.&quot;, Toast.LENGTH_SHORT).show();
                  // Do fun stuff here
              } else {
                  Log.e(TAG, &quot;ID token was null. Unable to sign in user.&quot;);
              }
          } else {
              Log.e(TAG, &quot;Failed to sign in with Google. Status:&quot; + googleSignInResult.getStatus());
          }
      }
  
      @Override
      public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
          Log.e(TAG, &quot;onConnectionFailed(&quot; + connectionResult + &quot;)&quot;);
      }
      
  }
  </code></pre>
  <p>What am I doing wrong?</p>
  <p>I'm using the following gradle dependency:</p>
  <pre><code>compile 'com.google.android.gms:play-services-auth:8.4.0'
  </code></pre>
  <p>The logged exception seems to come from another process. I've even tried to instanciate <code>com.google.android.gms.auth.api.signin.internal.SignInConfiguration</code> my Activity to be sure that I have the class accessible.</p>
  <p>This is happening on the debug build which doesn't use proguard.</p>