Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here.
Forum Discussion
RTS S.
10 years agoHelpful | Level 6
Java API - V2
I am trying to ugrade my Android App to V2. I have added the new API to the Eclipse Project using the Maven dependency.
There appears to be a dependency on SquareOK.com that I am not getting.
When I call:
DbxClientV2 GetClient(String Token) {0
String userLocale = Locale.getDefault().toString();
DbxRequestConfig requestConfig = new DbxRequestConfig("examples-v2-demo", userLocale, OkHttpRequestor.Instance);
return new DbxClientV2(requestConfig, Token);
}
I successfully received a token from:
String token = Auth.getOAuth2Token();
And used that to call the above function.
I am getting the following ClassPath loading error:
01-20 08:32:15.350: I/Timeline(22716): Timeline: Activity_idle id: android.os.BinderProxy@37d705b8 time:21337241
01-20 08:33:02.646: E/AndroidRuntime(22716): FATAL EXCEPTION: pool-1-thread-1
01-20 08:33:02.646: E/AndroidRuntime(22716): Process: com.rtsservices.test, PID: 22716
01-20 08:33:02.646: E/AndroidRuntime(22716): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/okhttp/OkHttpClient;
01-20 08:33:02.646: E/AndroidRuntime(22716): at com.dropbox.core.http.OkHttpRequestor.defaultOkHttpClient(OkHttpRequestor.java:36)
01-20 08:33:02.646: E/AndroidRuntime(22716): at com.dropbox.core.http.OkHttpRequestor.<clinit>(OkHttpRequestor.java:47)
01-20 08:33:02.646: E/AndroidRuntime(22716): at com.rtsservices.Accounts.GetClient(Accounts.java:104)
3 Replies
Replies have been turned off for this discussion
- Greg-DB10 years ago
Dropbox Community Moderator
Hi RTS, if you want to use OkHttp, you'll need to add it to your project, as noted here. It's only specified with the "provided" scope by the SDK's pom.xml.
- RTS S.10 years agoHelpful | Level 6
I have already added this .. to solve my problem ... but why is it marked provided ?
Your software has a dependency on it.
Provided is typically for things that are provided by the run time environment like JDK or things that may need a license.
Your install notes should state that this needs to be installed, and/or this provided line should be changed to compiled (the default).
- Greg-DB10 years ago
Dropbox Community Moderator
That's marked provided because it isn't strictly necessary when using the SDK. It's just an optional alternative to the standard HttpRequestor.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,038 PostsLatest Activity: 6 years ago
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!