Search code examples
androideclipsecordovaibm-mobilefirst

Worklight hybrid android project stuck on IBM logo?


I created a hybrid project which creates a default 'Hello Worklight' page which successfully runs on the android emulator... Now i replaced the default HTMl page with a different page along with its css and javascript folders... I rebuilt the project... It builds without any errors... But when the apps launches in the emulator....the app is just stuck on the IBM logo... I can see no errors in the logcat, that is why i cant figure out whats the problem... Do i need to modify something when i replaced the default HTML age? Help please....


Solution

  • You cannot simply "replace" the contents of index.html with some other content.

    The file MUST contain the following:

    • Reference to css/main.css in the HEAD
    • References to the following in the BODY
      • js/initOptions.js
      • js/main.js
      • js/messages.js

    Without these (and especially initOptions.js and main.js), the app will indeed get stuck on the splash because you will fail to load the Worklight framework, so nothing will work...

    Instead, you need to ADD to it (additional references, content, etc).
    Explain what you're trying to accomplish...