java.lang.NoClassDefFoundError: com.google.android.gms.common.AccountPicker

前提是你 提交于 2019-12-07 05:36:17

问题


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.


回答1:


I needed to make sure I had google play service imported and checked in order and export




回答2:


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.



来源:https://stackoverflow.com/questions/14790149/java-lang-noclassdeffounderror-com-google-android-gms-common-accountpicker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!