机器人沙丁鱼 + httpclientandroidlib
我试图使用这个库,但它不允许我:这是我的代码。
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) 未定义
im trying to use this library but it doesn't allow me: This is my code.
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();
}
}
}
but i get this: The constructor SardineImpl(DefaultHttpClient,String,String) is undefined
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查这个:https://github.com/aflx/Sardine-Android
Check this: https://github.com/aflx/Sardine-Android