我是 android 环境的新手,我已经安装了 eclipse 和 android 开发者工具。
我的 openerp 应用程序正在运行,我在“On create”方法中的“MainActivity.java”中编码,也就是说,
import java.net.MalformedURLException;
import java.net.URL;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import org.apache.xmlrpc.client.*;
import org.apache.xmlrpc.client.XmlRpcClient;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
OpenErpConnect connection=null;
try {
URL loginUrl=new URL("http","192.xxx.x.xx",xxxx,"/xmlrpc/common");
XmlRpcClient client=new XmlRpcClient();
Integer id=(Integer)client.call("login","new_db","admin","123456");
connection=new OpenErpConnect(server,port,db,user,pass,id);
}
catch ( XMLRPCException e) {
Log.d(CONNECTOR_NAME,e.toString());
}
catch ( MalformedURLException e) {
Log.d(CONNECTOR_NAME,e.toString());
}
catch ( ClassCastException e) {
Log.d(CONNECTOR_NAME,e.toString());
}
return connection;
}
我在“ Integer id=(Integer)client.call("login","new_db","admin","123456");
”行出现错误
错误是,
The type org.apache.xmlrpc.common.XmlRpcController cannot be resolved. It is indirectly referenced from required .class files
我做错了什么我想在从openERP连接后在android应用程序中得到结果
希望你的建议
谢谢