GoogleAccountCredential selectAccountIntent

I am trying to start an account selection dialog with the intention, I am going through GoogleAccountCredential.newChooseAccountIntent .

When compiling my source, a NoClassDefFoundError error NoClassDefFoundError .

Here is my error log:

 12-18 09:55:51.237: E/AndroidRuntime(25809): FATAL EXCEPTION: main 12-18 09:55:51.237: E/AndroidRuntime(25809): java.lang.NoClassDefFoundError: com.google.android.gms.common.AccountPicker 12-18 09:55:51.237: E/AndroidRuntime(25809): at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.newChooseAccountIntent(GoogleAccountCredential.java:171) 12-18 09:55:51.237: E/AndroidRuntime(25809): at com.arcticcoding.study.OverView.onCreate(OverView.java:67) 12-18 09:55:51.237: E/AndroidRuntime(25809): at android.app.Activity.performCreate(Activity.java:4465) 12-18 09:55:51.237: E/AndroidRuntime(25809): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) 
+4
source share
2 answers

You need to go to the Google Play services library. I had the same problem and resolved it here:

java.lang.NoClassDefFoundError on Android with GoogleAccountCredential.newChooseAccountIntent ()

0
source

In build.gradle add this code depending:

 compile('com.google.api-client:google-api-client-android:1.20.0') { exclude group: 'org.apache.httpcomponents' } 
0
source

All Articles