I am using the sardine library to put a file onto a WebDav server. I have sardine-5.4.jar in my libs folder. When I run the project I get in the logcat:
05-07 16:31:52.576: W/System.err(25875): SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
05-07 16:31:52.576: W/System.err(25875): SLF4J: See http://ift.tt/19pvuRr for further details.
So I follow the link and download slf4j-simple.jar, and add it to my project and get this;
[2015-05-07 16:34:14 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/slf4j/ILoggerFactory;
[2015-05-07 16:34:14 - IncabAndroid] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/slf4j/ILoggerFactory;
Please could someone show me how to correctly implement the use of Sardine.
I am only trying to do this chuck of code;
Sardine sardine = SardineFactory.begin("username", "password");
byte[] data;
try {
byte[] bFile = new byte[(int) myExternalFile2.length()];
//convert file into array of bytes
FileInputStream fileInputStream=null;
fileInputStream = new FileInputStream(myExternalFile2);
fileInputStream.read(bFile);
fileInputStream.close();
//data = FileUtils.readFileToByteArray(myExternalFile2);
sardine.put("http://ift.tt/1KlX8Tv"+sdDirList[0].toString(), bFile);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
I have in my libs;
android-support-v4.jar
core-3.2.0.jar
fluent-hc-4.4.1.jar
httpclient-4.4.1.jar
httpcore-4.4.1.jar
httpmime-4.4.1.jar
jackrabbit-webdav-2.2.6-with-dependencies.jar
jcifs-1.3.18.jar
nlog4j-1.2.25.jar
sardine-5.4.jar
Aucun commentaire:
Enregistrer un commentaire