Whenever I try to run my project, the app crashes with this:
E/dalvikvm(17890): Could not find class 'com.dropbox.client2.DropboxAPI', referenced from method ...
...
...
E/AndroidRuntime(17890): Caused by: java.lang.NoClassDefFoundError: com.dropbox.client2.session.Session$AccessType
I actually had this exact problem a few days ago, but I solved it by taking the dropbox jars off my build path, creating a folder in the root of my project called 'libs' and putting the jars in there. Now, after making no changes to my project setup, running the project causes it to crash again with the same error I had been getting previously.
I've tried removing and re-adding the libs folder (and cleaning). I've tried adding the jars to my build-path, both when they're sourced within the project in the libs folder and also externally somewhere else on my file system. And Eclipse recognizes the dropbox imports, so there's no errors reported. I don't know what else to do.
I am aware of this more-or-less identical question here and this "solution" here . Can anyone suggest anything that I could try? I'm blocked until I can figure this out. I'm running Windows with Eclipse Kepler (I think that's 4.3).
EDIT
It's working again. I checked all the possible options for export in the build-path order/export menu. Previously, only Android Private Libraries and Android Dependencies was checked:
I'm leaving this open in the hope that someone might tell why this fixed things.
i ran into this problem and figured out that when Dropbox said to add all the .jars under the sdk folder lib/
, you're not supposed to add the ones under lib/extra
and lib/test
. So the best way to import (IMO) is
lib/
folder you downloaded and extracted, select all the jars under lib/
but don't go into the subfolders
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.