问题
I've created an Android app in Worklight Developer Edition.
When I change the connectOnStartup
property to true
in the initOptions.js
file and then install the application on the device, on startup, in LogCat I see:
Client init failed. Connection to the service is not available.
And in the app there's a dialog with:
The application failed connecting to the service.
Can anyone help me?
回答1:
Make sure your device and host are using the same WiFi network...
To verify your device is able to connect to the server, open a mobile browser app (either the stock app or Chrome or otherwise, doesn't matter) and load http://your-server-address:10080/your-project-name/console
- If you do not see Worklight Console, then you have a network issue here, likely not using the same network or you are blocking some ports, etc
- If you do see Worklight Console, then we have another problem here...
来源:https://stackoverflow.com/questions/20860974/ibm-worklight-client-init-failed-connection-to-the-service-is-not-available