cannot access XmlRpcController,XmlRpchttpRequestConfig !!
button click ;static final String TAG = "OERP";final String url = "l";final String db = "database";final String username = "admin";final String password = "123";static final XmlRpcclIEnt clIEnt = new XmlRpcclIEnt();static final XmlRpcclIEntConfigImpl common_config = new XmlRpcclIEntConfigImpl();@OverrIDeprotected voID onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentVIEw(R.layout.activity_main); click=(button)findVIEwByID( R.ID.button); VIEw.OnClickListener l=new VIEw.OnClickListener() { @OverrIDe public voID onClick(VIEw v) {try{ Map emptyMap = Collections.emptyMap(); **/*first error*/** common_config.setServerURL( new URL(String.format("%s/xmlrpc/2/common",url))); **/*second error*/** int uID = (int) clIEnt.execute( common_config,"authenticate",asList( db,username,password,emptyMap)); **/*third error*/** final XmlRpcclIEnt models = new XmlRpcclIEnt() {{ setConfig(new XmlRpcclIEntConfigImpl() {{ setServerURL(new URL(String.format("%s/xmlrpc/2/object",url))); }}); }}; final Integer ID = (Integer) models.execute("execute_kw",asList( db,uID,"pointage.task","create",asList(new HashMap() {{ put("name","New Partner"); }}) )); } catch (MalformedURLException e){ Log.e(TAG,"/ :: "+e.getMessage(),e); } } };click.setonClickListener(l);} }
这是我的logcat:
解决方法 错误消息听起来像一些库文件丢失.您可以在 https://ws.apache.org/xmlrpc/download.html下载XMLRPC库.或者,Error:(60,19) error: cannot accessXmlRpchttpRequestConfig class file
for org.apache.xmlrpc.common.XmlRpchttpRequestConfig not foundError:(62,28) error: cannot access XmlRpchttpRequestConfigImpl
class file for
org.apache.xmlrpc.common.XmlRpchttpRequestConfigImpl not foundError:(67,34) error: cannot access XmlRpcController class file for
org.apache.xmlrpc.common.XmlRpcController not found
正如@ Steven7在评论中所说:
总结U need to dowload the jar file xmlrpc-common from 07001,coz it has these files u need :
accessXmlRpchttpRequestConfig
,XmlRpchttpRequestConfigImpl
andXmlRpcController
.
以上是内存溢出为你收集整理的android – 无法访问XmlRpcController,XmlRpcHttpRequestConfig全部内容,希望文章能够帮你解决android – 无法访问XmlRpcController,XmlRpcHttpRequestConfig所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)