java.lang.NoClassDefFoundError: com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential
Closed this issue · 2 comments
dpatel commented
I ma using war file in eclipse. From the saar file i export the jar file and added in my project. I did same code as you did in the sample application. But when i am trying to run the app it is crashing. Below is my console log.
02-10 23:19:23.283: E/AndroidRuntime(2971): FATAL EXCEPTION: main
02-10 23:19:23.283: E/AndroidRuntime(2971): java.lang.NoClassDefFoundError: com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential
02-10 23:19:23.283: E/AndroidRuntime(2971): at com.bingzer.android.driven.gdrive.app.GoogleDriveActivity.createGoogleAccountCredential(GoogleDriveActivity.java:130)
02-10 23:19:23.283: E/AndroidRuntime(2971): at com.bingzer.android.driven.gdrive.app.GoogleDriveActivity.onCreate(GoogleDriveActivity.java:52)
02-10 23:19:23.283: E/AndroidRuntime(2971): at android.app.Activity.performCreate(Activity.java:5133)
02-10 23:19:23.283: E/AndroidRuntime(2971): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
02-10 23:19:23.283: E/AndroidRuntime(2971): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
02-10 23:19:23.283: E/AndroidRuntime(2971): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
02-10 23:19:23.283: E/AndroidRuntime(2971): at android.app.ActivityThread.access$600(ActivityThread.java:141)
02-10 23:19:23.283: E/AndroidRuntime(2971): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
02-10 23:19:23.283: E/AndroidRuntime(2971): at android.os.Handler.dispatchMessage(Handler.java:99)
02-10 23:19:23.283: E/AndroidRuntime(2971): at android.os.Looper.loop(Looper.java:137)
02-10 23:19:23.283: E/AndroidRuntime(2971): at android.app.ActivityThread.main(ActivityThread.java:5103)
02-10 23:19:23.283: E/AndroidRuntime(2971): at java.lang.reflect.Method.invokeNative(Native Method)
02-10 23:19:23.283: E/AndroidRuntime(2971): at java.lang.reflect.Method.invoke(Method.java:525)
02-10 23:19:23.283: E/AndroidRuntime(2971): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
02-10 23:19:23.283: E/AndroidRuntime(2971): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
02-10 23:19:23.283: E/AndroidRuntime(2971): at dalvik.system.NativeStart.main(Native Method)
Can you please let me know whats wrong with my code? I am using
if(!gdrive.isAuthenticated()){
GoogleDriveActivity.launch(this);
}
in increate method and able to select google account after that on result i am getting 0.
bingzer commented
My first thought: Did you add google apis dependency? See build.gradle on Google drive provider.
dpatel commented