0
votes

I have created a Worklight application using Dojo with the Android environment.

I tried running that application in the MBS, and it works fine. But when I tried that in emulator and real device, the application fails to load.

In the device it shows:

unfortunately the application has stopped

In the emulator is shows:

Failed to Load UI

I have also created iPhone environment, there it works fine in both simulator and device.

I have copied all the Dojo library files in my project's www folder.

I also happened to read this Post - IBM Worklight Hybrid Android application can't run on real device, I have tried the steps provided but it still fails to load.

Error Images in Emulator:
enter image description here

LogCat:
enter image description here

1
What is your Worklight version... What is your ADT version... Please ALWAYS post with detailed information about your setup and with any errors you get in either LogCat, Worklight Server, device or otherwise, otherwise no one can help you.Idan Adar
Worklight v 6.0 , ADT v 22 , its not showing any error in Worklight server console or worklight console.After UI load failure error a black screen will display for around 5 min and displays "unfortunately the application has stopped" error.I have also Included images.I have also tried installing the .apk file in my android device,but after running the application it only shows black screen.Cyber
Please look at the LogCat view in Eclipse; it should show some error or exception there about what caused the app termination. Make sure the device is connected to the computer with a USB cable.Idan Adar
My LogCat is showing 2 error ,please see the images..And when i click back button in my device it shows the error "unfortunately the application has stopped".Cyber
There should be more log lines... these two mean nothing. If you'd like, export your Worklight project from Eclipse and upload it somewhere so that I could download it and test.Idan Adar

1 Answers

1
votes

I have found out the Solution.Initially i have added all Dojo library folder to my project www folder that makes my hybrid application hangs.

What i did is i have removed all the Dojo folder from my Worklight application www folder and added only the required dojo files to my project www folder.

You can check the missing library files by opening the Console view (Window > Show View > Other... > Console). From the Console view, click the Open Console button and choose Dojo Library Requests from the list. From the Dojo Library Requests console, click the View Menu (the triangle in the toolbar), and uncheck Provide Library Resources.

Now Run you hybrid application to see all your missing Library Resources.