我一直在试图开发一个可以从CIFS/SMB协议中获取信息的android应用程序。我尝试过JCIFS,并且不断读取我的eclipse应用程序不能读取包的错误(即使我已经使用了Javadoc),我的最后一招就是获得帮助。因此,任何人都可以提供煽动/如何做到这一点的信息?使用Android应用程序从CIFS/SMB读取信息
我已经试过这样:Copy all files from server to Android Device
我已经试过这样:http://jcifs.samba.org/
我已经试过这样:http://learn-it-stuff.blogspot.com/2012/01/adding-jcifs-api-to-our-android-java.html
也许有几件事情,我不是在理解可以充实的时刻。
我我正在使用的代码片段的(复制和直接从第三链接粘贴在大多数情况下):
public void login(String address2, String username2, String password2)
throws Exception {
setDomain(UniAddress.getByName(address2));
setAuthentication(new NtlmPasswordAuthentication(address2, username2,
password2));
SmbSession.logon(getDomain(), authentication);
}
public UniAddress getDomain() {
return domain;
}
/**
* @param domain
* the domain to set
*/
public void setDomain(UniAddress domain) {
this.domain = domain;
}
/**
* @return the authentication
*/
public NtlmPasswordAuthentication getAuthentication() {
return authentication;
}
/**
* @param authentication
* the authentication to set
*/
public void setAuthentication(NtlmPasswordAuthentication authentication) {
this.authentication = authentication;
}
,然后从这里我打电话登录();与地址,用户名和密码。当我这样做时,应用程序崩溃,并在下列行中给出错误“NoClassDefFoundError”:setDomain(UniAddress ....),具体来说来自UniAddress类。
任何人都可以帮助我吗?