Skip to content
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.

Could not find class 'com.octo.android.robospice.persistence.ObjectPersister' #461

Open
manikavi opened this issue Sep 26, 2016 · 4 comments

Comments

@manikavi
Copy link

manikavi commented Sep 26, 2016

Hi,
After migrating my project from eclipse to android studio 2.2,I am getting this issue,any help to resolve this issue?

E/dalvikvm: Could not find class 'com.octo.android.robospice.persistence.ObjectPersister', referenced from method com.octo.android.robospice.persistence.CacheManager.addPersister

build.gradle is

    compile files('libs/commons-io-1.3.2.jar')
    compile files('libs/commons-lang3-3.1.jar')
    compile files('libs/jsr305-1.3.9.jar')
    compile files('libs/robospice-1.4.11.jar')
    compile files('libs/robospice-cache-1.4.11.jar')
    compile files('libs/robospice-google-http-client-1.4.11.jar')
@mykolaj
Copy link

mykolaj commented Sep 26, 2016

Hello. Could you please ask that kind of things on Stackoverflow? This isn't an issue of Robospice but of your project/build tools setup. There's no need to clog a section which is intended for different kind of things.

@manikavi
Copy link
Author

Hi,
I thought this is related to robospice lib,So i posted here

@manikavi
Copy link
Author

Hello,
My issue is in detail below,May i know the reason,why you said,this isn't an issue of Robospice

V//SpiceManager.java:1189: 18:06:45.854 SpiceManagerThread 0 Binding to service succeeded.
E/AndroidRuntime: FATAL EXCEPTION: main
                  java.lang.NoClassDefFoundError: com.octo.android.robospice.priority.PausablePriorityBlockingQueue
                      at com.octo.android.robospice.priority.PausableThreadPoolExecutor.<init>(PausableThreadPoolExecutor.java:25)
                      at com.octo.android.robospice.priority.PriorityThreadPoolExecutor.<init>(PriorityThreadPoolExecutor.java:23)
                      at com.octo.android.robospice.priority.PriorityThreadPoolExecutor.getPriorityExecutor(PriorityThreadPoolExecutor.java:35)
                      at com.octo.android.robospice.SpiceService.getExecutorService(SpiceService.java:228)
                      at com.octo.android.robospice.SpiceService.onCreate(SpiceService.java:117)
                      at android.app.ActivityThread.handleCreateService(ActivityThread.java:2401)
                      at android.app.ActivityThread.access$1600(ActivityThread.java:140)
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1310)
                      at android.os.Handler.dispatchMessage(Handler.java:99)
                      at android.os.Looper.loop(Looper.java:137)
                      at android.app.ActivityThread.main(ActivityThread.java:4895)
                      at java.lang.reflect.Method.invokeNative(Native Method)
                      at java.lang.reflect.Method.invoke(Method.java:511)
                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
                      at dalvik.system.NativeStart.main(Native Method)
D//SpiceManager.java:1236: 18:06:45.855 SpiceManagerThread 0 Waiting for service to be bound.

@mykolaj
Copy link

mykolaj commented Sep 26, 2016

Well, lets say i've said that because i use Robospice in every single project i do which required REST communications, and haven't struggled with this error that much that only thing left to do is to open an issue on Github. That's one thing. A lot of people use it too by the way.

Second thing is that you've posted two different errors already. That's right. Not one error but two errors. Which may indicate that there's definitely something going on.

Third thing is that some time ago i've made a module for Robospice and was forced to understand some inner Robospice organization because of that. One of those things was tests. Tests which wouldn't have passed in case of some class definitions wasn't found.

One more thing - which is based on my own experience completely and IS NOT to be TRUSTED because of that - is that every time NoClassDefFoundError occured to me meant someone has something messed up with build chain. Maybe ProGuard shrinking or renaming your classes. Check that.

Also take into your sight that when i say "Robospice" i mean "Robospice 1.4.14".

But please don't take my word as indisputable truth. I may be very wrong because i haven't tried every possible combinations of android build tools versions and gradle plugin versions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants