Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/216.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android本机应用程序未连接到Worklight Server_Android_Ibm Mobilefirst_Native_Worklight Server - Fatal编程技术网

Android本机应用程序未连接到Worklight Server

Android本机应用程序未连接到Worklight Server,android,ibm-mobilefirst,native,worklight-server,Android,Ibm Mobilefirst,Native,Worklight Server,我正在尝试将我的android本机应用程序连接到worklight server,但总是出现以下错误: Unexpected errorCode occurred. Please try again. 我的主要活动中有以下代码: connectBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { connec

我正在尝试将我的android本机应用程序连接到worklight server,但总是出现以下错误:

Unexpected errorCode occurred. Please try again.
我的主要活动中有以下代码:

connectBtn.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

            connectBtn.setText("Connecting...");
            client = WLClient.createInstance(getApplicationContext());
            WLClient.getInstance().connect(new MyConnectListener());


        }
    });
我创建了这个类作为连接侦听器:

public class MyConnectListener implements WLResponseListener {

@Override
public void onSuccess(WLResponse wlResponse) {


    Log.d("Status", "CONNECTED");


}

@Override
public void onFailure(WLFailResponse wlFailResponse) {
    Log.d("Status", "FAILED CONNECTION "+ wlFailResponse.getErrorCode().getDescription().toString());
}
}
在我的wlclient.properties中,我使用的是端口值为空的HTTPS,如IBM教程中所述。
对此问题的任何帮助都将不胜感激。

如果出现以下情况,您必须断开连接端口: HTTPS:port=443 HTTP:port=80