Ok, I have been losing a lot of sleep over this, I can not seem to find what the issue is.
I am trying to integrate google drive with a big application I am working on with a team. .
Here is what logcat spits out:
02-09 10:13:40.979: E/AndroidRuntime(9768): java.lang.NoClassDefFoundError: com.google.android.gms.common.AccountPicker
02-09 10:13:40.979: E/AndroidRuntime(9768): at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.newChooseAccountIntent(GoogleAccountCredential.java:171)
02-09 10:13:40.979: E/AndroidRuntime(9768): at graef.mobile.activities.DriveHandler.onCreate(DriveHandler.java:36)
02-09 10:13:40.979: E/AndroidRuntime(9768): at android.app.Activity.performCreate(Activity.java:4465)
02-09 10:13:40.979: E/AndroidRuntime(9768): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
02-09 10:13:40.979: E/AndroidRuntime(9768): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2033)
02-09 10:13:40.979: E/AndroidRuntime(9768): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2104)
02-09 10:13:40.979: E/AndroidRuntime(9768): at android.app.ActivityThread.access$600(ActivityThread.java:132)
02-09 10:13:40.979: E/AndroidRuntime(9768): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1157)
02-09 10:13:40.979: E/AndroidRuntime(9768): at android.os.Handler.dispatchMessage(Handler.java:99)
02-09 10:13:40.979: E/AndroidRuntime(9768): at android.os.Looper.loop(Looper.java:137)
02-09 10:13:40.979: E/AndroidRuntime(9768): at android.app.ActivityThread.main(ActivityThread.java:4575)
02-09 10:13:40.979: E/AndroidRuntime(9768): at java.lang.reflect.Method.invokeNative(Native Method)
02-09 10:13:40.979: E/AndroidRuntime(9768): at java.lang.reflect.Method.invoke(Method.java:511)
02-09 10:13:40.979: E/AndroidRuntime(9768): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
02-09 10:13:40.979: E/AndroidRuntime(9768): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
02-09 10:13:40.979: E/AndroidRuntime(9768): at dalvik.system.NativeStart.main(Native Method)
I have all the libraries I need, I have also gotten a few Multiple dex errors. so I have nothing in my libs folder because I found that as a solution to that problem because of double jars in /libs and /bin/dexedLibs
Any help would much be appreciated
Let me know what other information I need to provide.
I needed to make sure I had google play service imported and checked in order and export
I also had same problem, until I add:
import com.google.android.gms.common.AccountPicker;
in my activity.java
file. Hope it works for your problem too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With