Google Calendar API无法正常工作-如何解决?

时间:2018-10-23 17:04:29

标签: java android google-api google-calendar-api

有人知道这是什么错误消息吗?我无法在我的应用中运行Google日历。我将源代码放入我的项目中,以显示此消息。

来源:How to integrate google calendar api in android application

抱歉,如果缺少信息,我将编辑问题并添加其他信息。

Screenshot

2018-10-24 01:54:05.466 9167-9320/com.example.edward.neweventmanagementsystem E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
    Process: com.example.edward.neweventmanagementsystem, PID: 9167
    java.lang.RuntimeException: An error occurred while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:330)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
        at java.util.concurrent.FutureTask.run(FutureTask.java:242)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:255)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:776)
     Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzaa;
        at com.google.android.gms.auth.zzd.zzc(Unknown Source)
        at com.google.android.gms.auth.zzd.getToken(Unknown Source)
        at com.google.android.gms.auth.zzd.getToken(Unknown Source)
        at com.google.android.gms.auth.zzd.getToken(Unknown Source)
        at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
        at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.getToken(GoogleAccountCredential.java:269)
        at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:294)
        at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:868)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
        at com.example.edward.neweventmanagementsystem.CalendarActivity$MakeRequestTask.getDataFromApi(CalendarActivity.java:343)
        at com.example.edward.neweventmanagementsystem.CalendarActivity$MakeRequestTask.doInBackground(CalendarActivity.java:319)
        at com.example.edward.neweventmanagementsystem.CalendarActivity$MakeRequestTask.doInBackground(CalendarActivity.java:298)
        at android.os.AsyncTask$2.call(AsyncTask.java:316)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:255) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
        at java.lang.Thread.run(Thread.java:776) 
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzaa" on path: DexPathList[[zip file "/data/app/com.example.edward.neweventmanagementsystem-1/base.apk"],nativeLibraryDirectories=[/data/app/com.example.edward.neweventmanagementsystem-1/lib/arm64, /system/lib64, /vendor/lib64, /system/vendor/lib64, /product/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.google.android.gms.auth.zzd.zzc(Unknown Source) 
        at com.google.android.gms.auth.zzd.getToken(Unknown Source) 
        at com.google.android.gms.auth.zzd.getToken(Unknown Source) 
        at com.google.android.gms.auth.zzd.getToken(Unknown Source) 
        at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source) 
        at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.getToken(GoogleAccountCredential.java:269) 
        at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:294) 
        at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:868) 
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419) 
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352) 
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469) 
        at com.example.edward.neweventmanagementsystem.CalendarActivity$MakeRequestTask.getDataFromApi(CalendarActivity.java:343) 
        at com.example.edward.neweventmanagementsystem.CalendarActivity$MakeRequestTask.doInBackground(CalendarActivity.java:319) 
        at com.example.edward.neweventmanagementsystem.CalendarActivity$MakeRequestTask.doInBackground(CalendarActivity.java:298) 
        at android.os.AsyncTask$2.call(AsyncTask.java:316) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:255) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
        at java.lang.Thread.run(Thread.java:776) 
2018-10-24 01:54:05.468 579-1135/? I/logserver: handle_logfile_events, Object Path:/data/system/dropbox/, mask=0x00000080
2018-10-24 01:54:05.468 1279-1279/? I/SendBroadcastPermission: action:android.intent.action.DROPBOX_ENTRY_ADDED, mPermissionType:0
2018-10-24 01:54:05.468 579-1135/? I/logserver: process_one_event, event->len=48, name=data_app_crash@1540317245468.txt
2018-10-24 01:54:05.468 579-1135/? I/logserver: find_first_match: find match, plogs(type=1, pfile=/data/system/dropbox/, match=app_crash)
2018-10-24 01:54:05.468 579-1135/? I/iMonitor: create: 901001001
2018-10-24 01:54:05.468 579-1135/? I/logserver: process_event_by_imonitor, pos=0, type=crash, event_id=901001001
2018-10-24 01:54:05.468 579-1135/? I/logserver: get_acr_info, match:(app_crash), actual_name:(data_app_crash@1540317245468.txt)
2018-10-24 01:54:05.468 579-1135/? E/logserver: imonitor_add_dynamic_path, path:/data/system/dropbox/data_app_crash@1540317245468.txt
2018-10-24 01:54:05.468 579-1135/? I/iMonitor: send: 901001001
2018-10-24 01:54:05.468 579-1135/? I/logserver: imonitor_send_event ret=177
2018-10-24 01:54:05.468 579-1136/? I/logserver: handle_exception_events enter
2018-10-24 01:54:05.481 431-1502/? I/gralloc: alloc_device_alloc:564: Alloc handle(0x73be639700): interfmt=1, stride=1280, size=2764800, usage=0xb00
2018-10-24 01:54:05.483 431-1502/? I/gralloc: alloc_device_alloc:564: Alloc handle(0x73be60fe00): interfmt=1, stride=1280, size=2764800, usage=0xb00
2018-10-24 01:54:05.484 431-1502/? I/gralloc: alloc_device_alloc:564: Alloc handle(0x73aa422900): interfmt=1, stride=1280, size=2764800, usage=0xb00
2018-10-24 01:54:05.495 431-445/? E/ion: set flags ioctrl failed!
2018-10-24 01:54:05.497 431-445/? I/gralloc: alloc_device_alloc:564: Alloc handle(0x73aa422f00): interfmt=200000001, stride=1088, size=8486912, usage=0xb00
2018-10-24 01:54:05.497 431-445/? E/ion: set flags ioctrl failed!
2018-10-24 01:54:05.502 431-445/? I/gralloc: alloc_device_alloc:564: Alloc handle(0x73b86c1100): interfmt=200000001, stride=1088, size=8486912, usage=0xb00
2018-10-24 01:54:05.502 431-445/? E/ion: set flags ioctrl failed!
2018-10-24 01:54:05.508 431-445/? I/gralloc: alloc_device_alloc:564: Alloc handle(0x73b86c1300): interfmt=200000001, stride=1088, size=8486912, usage=0xb00
2018-10-24 01:54:05.508 1279-6487/? E/ReportTools: This is not beta user build
2018-10-24 01:54:05.509 9167-9320/com.example.edward.neweventmanagementsystem I/Process: Sending signal. PID: 9167 SIG: 9
2018-10-24 01:54:05.510 1279-1113/? E/HsmCoreServiceImpl: onTransact in code is: 103
2018-10-24 01:54:05.510 1279-1113/? I/MediaProcessHandler: playingUids: 
2018-10-24 01:54:05.511 1741-2005/? I/AppManager: removeProcessDependency pid:9167
2018-10-24 01:54:05.525 3090-9304/? I/SendBroadcastPermission: action:com.google.android.gms.gcm.ACTION_SCHEDULE, mPermissionType:0
2018-10-24 01:54:05.576 3090-9304/? I/SendBroadcastPermission: action:com.google.android.gms.gcm.ACTION_SCHEDULE, mPermissionType:0
2018-10-24 01:54:05.617 1279-1402/? W/InputDispatcher: channel '73e4b80 com.example.edward.neweventmanagementsystem/com.example.edward.neweventmanagementsystem.CalendarActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
2018-10-24 01:54:05.617 1279-1402/? E/InputDispatcher: channel '73e4b80 com.example.edward.neweventmanagementsystem/com.example.edward.neweventmanagementsystem.CalendarActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2018-10-24 01:54:05.617 1279-1402/? W/InputDispatcher: channel 'fde61c1 com.example.edward.neweventmanagementsystem/com.example.edward.neweventmanagementsystem.StaffAllocation (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
2018-10-24 01:54:05.617 1279-1402/? E/InputDispatcher: channel 'fde61c1 com.example.edward.neweventmanagementsystem/com.example.edward.neweventmanagementsystem.StaffAllocation (server)' ~ Channel is unrecoverably broken and will be disposed!
2018-10-24 01:54:05.617 1279-1402/? W/InputDispatcher: channel 'bf118b2 com.example.edward.neweventmanagementsystem/com.example.edward.neweventmanagementsystem.CalendarActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
2018-10-24 01:54:05.617 1279-1402/? E/InputDispatcher: channel 'bf118b2 com.example.edward.neweventmanagementsystem/com.example.edward.neweventmanagementsystem.CalendarActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2018-10-24 01:54:05.617 1279-1402/? W/InputDispatcher: channel 'a17d7e6 com.example.edward.neweventmanagementsystem/com.example.edward.neweventmanagementsystem.MainActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
2018-10-24 01:54:05.617 1279-1402/? E/InputDispatcher: channel 'a17d7e6 com.example.edward.neweventmanagementsystem/com.example.edward.neweventmanagementsystem.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2018-10-24 01:54:05.630 2100-7870/? E/NetworkScheduler: Invalid component specified.

1 个答案:

答案 0 :(得分:0)

这看起来不像Google Calendar API问题,但可能是使用Java编译的。尝试this