Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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)
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.
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).
That's marked provided because it isn't strictly necessary when using the SDK. It's just an optional alternative to the standard HttpRequestor.
Hi there!
If you need more help you can view your support options (expected response time for a 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!