我试图使用这个库,但它不允许我:这是我的代码。
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) 未定义