cloudinary/cloudinary_android

Rejecting re-init on previously-failed class java.lang.Class<com.evernote.android.job.gcm.PlatformGcmService>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/gcm/GcmTaskService;

vikassminq opened this issue · 13 comments

I am using android sdk version :
implementation group: 'com.cloudinary', name: 'cloudinary-android', version: '1.24.0'

Hi @vikassminq, we're really sorry for the very late reply. Can you please let us know if you're still facing any issues here or we can close this one? Thanks!

Closing this issue due to the time elapsed. Please feel free to either re-open the issue, contact our support at http://support.cloudinary.com or create a new ticket if you have any additional issues.

I'm having the same issue

@iguerendiain java.lang.NoClassDefFoundError indicates, that something was found at compile time but not at runtime. Can you try to add it to the Classpath.

Right click on your project and select -> Compile Module, and then re-start the project and it should work again.

Let us know if that helps?

@idobarnoam Thanks for your response. The problem did not relied there, after I fixed the issue the error kept showing on logcat but everything was working ok.

@iguerendiain so you are saying the project works correctly but you are still seeing the error?

Yes, that's right, the files upload correctly but the error is being shown on logcat.

Hi.
Could you please share with me the full error stack-trace?

Thanks

2018-12-10 10:25:40.975 24854-30083/<<package_id>> I/art: Rejecting re-init on previously-failed class java.lang.Class<com.evernote.android.job.gcm.PlatformGcmService>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/gcm/GcmTaskService; 2018-12-10 10:25:40.975 24854-30083/<<package_id>> I/art: at boolean com.evernote.android.job.GcmAvailableHelper.isGcmApiSupported(android.content.Context) (GcmAvailableHelper.java:45) 2018-12-10 10:25:40.975 24854-30083/<<package_id>> I/art: at boolean com.evernote.android.job.JobApi.isSupported(android.content.Context) (JobApi.java:125) 2018-12-10 10:25:40.976 24854-30083/<<package_id>> I/art: at void com.evernote.android.job.JobProxy$Common.cleanUpOrphanedJob(android.content.Context, int) (JobProxy.java:270) 2018-12-10 10:25:40.976 24854-30083/<<package_id>> I/art: at void com.evernote.android.job.JobManager.schedule(com.evernote.android.job.JobRequest) (JobManager.java:184) 2018-12-10 10:25:40.976 24854-30083/<<package_id>> I/art: at int com.evernote.android.job.JobRequest.schedule() (JobRequest.java:406) 2018-12-10 10:25:40.976 24854-30083/<<package_id>> I/art: at void com.cloudinary.android.AndroidJobStrategy.doDispatch(com.cloudinary.android.UploadRequest) (AndroidJobStrategy.java:98) 2018-12-10 10:25:40.976 24854-30083/<<package_id>> I/art: at java.lang.String com.cloudinary.android.DefaultRequestDispatcher.dispatch(com.cloudinary.android.UploadRequest) (DefaultRequestDispatcher.java:51) 2018-12-10 10:25:40.976 24854-30083/<<package_id>> I/art: at void com.cloudinary.android.UploadRequest$1.run() (UploadRequest.java:212) 2018-12-10 10:25:40.976 24854-30083/<<package_id>> I/art: at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1133) 2018-12-10 10:25:40.976 24854-30083/<<package_id>> I/art: at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:607) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at void java.lang.Thread.run() (Thread.java:761) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.gcm.GcmTaskService" on path: DexPathList[[zip file "/data/app/<<package_id>>-1/base.apk", zip file "/data/app/<<package_id>>-1/split_lib_dependencies_apk.apk", zip file "/data/app/<<package_id>>-1/split_lib_slice_0_apk.apk", zip file "/data/app/<<package_id>>-1/split_lib_slice_1_apk.apk", zip file "/data/app/<<package_id>>-1/split_lib_slice_2_apk.apk", zip file "/data/app/<<package_id>>-1/split_lib_slice_3_apk.apk", zip file "/data/app/<<package_id>>-1/split_lib_slice_4_apk.apk", zip file "/data/app/<<package_id>>-1/split_lib_slice_5_apk.apk", zip file "/data/app/<<package_id>>-1/split_lib_slice_6_apk.apk", zip file "/data/app/<<package_id>>-1/split_lib_slice_7_apk.apk", zip file "/data/app/<<package_id>>-1/split_lib_slice_8_apk.apk", zip file "/data/app/<<package_id>>-1/split_lib_slice_9_apk.apk"],native 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at boolean com.evernote.android.job.GcmAvailableHelper.isGcmApiSupported(android.content.Context) (GcmAvailableHelper.java:45) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at boolean com.evernote.android.job.JobApi.isSupported(android.content.Context) (JobApi.java:125) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at void com.evernote.android.job.JobProxy$Common.cleanUpOrphanedJob(android.content.Context, int) (JobProxy.java:270) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at void com.evernote.android.job.JobManager.schedule(com.evernote.android.job.JobRequest) (JobManager.java:184) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at int com.evernote.android.job.JobRequest.schedule() (JobRequest.java:406) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at void com.cloudinary.android.AndroidJobStrategy.doDispatch(com.cloudinary.android.UploadRequest) (AndroidJobStrategy.java:98) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at java.lang.String com.cloudinary.android.DefaultRequestDispatcher.dispatch(com.cloudinary.android.UploadRequest) (DefaultRequestDispatcher.java:51) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at void com.cloudinary.android.UploadRequest$1.run() (UploadRequest.java:212) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1133) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:607) 2018-12-10 10:25:40.977 24854-30083/<<package_id>> I/art: at void java.lang.Thread.run() (Thread.java:761)

I search for this error in StackOverflow and they suggest:

  • File -> Invalidate Cache and restart
  • Update com.android.support

Hope that helps

@iguerendiain Did @shirlymanor's response helped?

Sorry for the delay, I was not even aware there was another comment. Cache invalidation does nothing. However, a few weeks ago we updated all the libraries of the app and solved all conflicts and patches in dependencies, including migrating to AndroidX and using all the latest versions of each library. After all that work the error is not showing.

I would like to be clear in the fact that the upload process never failed, it just was showing that error.

Thanks for the update. Happy to hear that the new version works.