I am developing an mobile application using IBM MobileFirst Plaform.
When I test the app in the browser, Mobile simulator and android emulator the application is working fine. When I deploy the apk file in my android device and run the application is not running. when I checked the logcat I have the following error.
I/Web Console(20334): processMessage failed: Message: F09 WLAuthorizationManagerPlugin1268447688 {"wlFailureStatus":"UNRESPONSIVE_HOST","status":500,"responseText":"","statusText":"The service is currently not available."} at file:///android_asset/www/default/worklight/cordova.js:1063
Both my laptop and Mobile are connected to same wifi network
答案 0 :(得分:0)
您的服务器可能设置为“localhost”。
验证应用程序现在是否能够连接到MFP服务器。
答案 1 :(得分:0)
你检查了原生android文件夹中的wlclient.properties文件吗? 在该文件中检查wlserverhost和wlserver端口。在此之前,如果您将应用程序部署到任何远程服务器,应为Android环境配置IP地址和端口号。 通过取消选中更改该IP地址和端口号构建应用程序以使用其他Mobile第一台服务器... 重新构建应用程序到本地移动第一台服务器..
答案 2 :(得分:0)
Para eclipse luna 4.4.0和WORKLIGHT 6.3
function wlCommonInit() {
//set url de conexion para Android
var environment = WL.Client.getEnvironment();
if (environment == WL.Environment.ANDROID) {
WL.App.setServerUrl("https://<SERVER>: <PORT>/<contextPATH>",setServerURLSuccess, setServerURLFailure);
}
........
};
并创建两个方法
function setServerURLSuccess() {
// Display the newly set server URL.
//alert(getServerURL());
}
function setServerURLFailure() {
WL.SimpleDialog.show(
"Change Server URL", "Failed setting Server URL",
[{
text: "Close", handler: function() {}
}]
)
}
Saludos !!!