1

我尝试遵循此CloudRail示例。

这是我的代码:

OneDrive client = new OneDrive(new LocalReceiver(8082), CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, ""); 
//I'm not sure about the parameter 'state' so I left an empty string here
//The REDIRECT_URI is "https://login.live.com/oauth20_desktop.srf"
InputStream inputStream = new FileInputStream(fileToUpload);
client.upload(fileToUpload.getPath(), inputStream, fileToUpload.length(), false);

我收到了这个错误:

java.lang.ClassNotFoundException: com.mashape.unirest.request.HttpRequestWithBody

在第一行。

请帮忙。

4

1 回答 1

1

当您从 Github 集成纯 .jar 文件时,您还需要包含 unirest 库,因为 CloudRail SDK 中需要它。你可以在这里下载:https ://github.com/Mashape/unirest-java

于 2017-10-06T08:32:36.763 回答