android沙丁鱼+ httpclientandroidlib

时间:2011-11-10 14:32:29

标签: android httpclient webdav sardine

我试图使用这个库,但它不允许我:这是我的代码。

import java.io.IOException;
import java.util.List;

import com.googlecode.sardine.DavResource;
import com.googlecode.sardine.impl.SardineImpl;

import ch.boye.httpclientandroidlib.impl.client.DefaultHttpClient;
import android.app.Activity;
import android.os.Bundle;


public class sardine extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        DefaultHttpClient httpClient = new DefaultHttpClient();
        SardineImpl sardine = new SardineImpl(httpClient,"testuser","test");
        try {
            List<DavResource> resources = sardine.getResources("http://demo.sabredav.org/");
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }


    }
}

但我明白了:构造函数SardineImpl(DefaultHttpClient,String,String)未定义

1 个答案:

答案 0 :(得分:0)