Getting started with DropboxAPI, class not found

百般思念 提交于 2019-12-06 00:27:32

This problem appeared when I imported dropbox jars in the next way: eclipse project menu -> Build Path -> Configure Build Path -> Libraries -> Add External JARs;

After that, I revert changes, create folder 'libs' in Project Explorer, in 'libs' folder menu select 'Import...' -> File System. Select path and import all jars into 'libs' project folder. Problem disappear.

My mistake, the problem was the classPath.

I had to add all reference libraries in both the lib and libs folder before it worked, so something is clearly wrong, and for some reason it needs apache-mime4j-0.6 in the lib folder, but the example project from Dropbox on how to implement it don't? can someone from the Dropbox Team deliberate on this? Note: the application used the previous deprecated api, and when I tried updating it with the newest I got this error.

java.lang.NoClassDefFoundError: com.dropbox.client2.session.Session$AccessType

on

private AccessType ACCESS_TYPE = AccessType.APP_FOLDER;

Step to set jar file for dropbox .

u must add dropbox-android-Sdk.jar file as library.

Add to build path and then go to properties.

go in java build path and click order and export and click that dropbox-android-sdk.jar file.

u can also add jar and locate your dropbox-android-sdk.jar file and then ok.

Working in Eclipse (Luna) I could resolve the error by Project->Properties->Java Build Path->Order And Export and then putting a tick on (in my case for Dropbox 1.6.3) the two Dropbox jar files. Followed by the usual clean project and run.
This is reproducable by removing the checks marks from the boxes in the Order and Export dialog.

Please check the name of the project libs, its correct name is libs.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!