【问题标题】:Google Drive SDK application to upload file用于上传文件的 Google Drive SDK 应用程序
【发布时间】:2013-07-27 04:15:22
【问题描述】:

我正在尝试使用 Google Drive SDK 上传文件,但我收到了一个弹出窗口,上面写着 unfortunately your application has stopped。这是由于NoClassDefFoundError。我还确保包含播放服务 jar 并在 order 和 export 选项卡中检查它。

这是例外:

E/AndroidRuntime( 4906): java.lang.NoClassDefFoundError: com.google.android.gms.common.AccountPicker
E/AndroidRuntime( 4906):        at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.
newChooseAccountIntent(GoogleAccountCredential.java:253)
E/AndroidRuntime( 4906):        at com.example.informationretreival.MainActivity.onCreate(MainActivity.java:42)
E/AndroidRuntime( 4906):        at android.app.Activity.performCreate(Activity.java:5104)
E/AndroidRuntime( 4906):        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
E/AndroidRuntime( 4906):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2147)
E/AndroidRuntime( 4906):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
E/AndroidRuntime( 4906):        at android.app.ActivityThread.access$600(ActivityThread.java:144)
E/AndroidRuntime( 4906):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
E/AndroidRuntime( 4906):        at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 4906):        at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 4906):        at android.app.ActivityThread.main(ActivityThread.java:5074)
E/AndroidRuntime( 4906):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4906):        at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 4906):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime( 4906):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
E/AndroidRuntime( 4906):        at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager(  771):   Force finishing activity com.example.informationretreival/.MainActivity

我正在关注developer website 上的快速入门,我实际上只是复制了代码。我希望快速入门示例能够工作。有人请指出我正确的方向。

【问题讨论】:

    标签: android google-drive-api noclassdeffounderror google-play-services


    【解决方案1】:

    在您的 Android 应用程序配置页面中,为 Compile with 选择 Google APIs (Google Inc.) (API 17)。此外,由于虚拟设备没有Play商店,因此它在真机上比在虚拟设备上运行更稳定。

    【讨论】:

    • 我的构建目标是 API 17 Google API。所以,我认为这不是问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-25
    • 1970-01-01
    • 2019-05-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多