0

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

Community
  • 1
  • 1
Cyber
  • 4,844
  • 8
  • 41
  • 61
  • 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 Aug 28 '13 at 05:56
  • 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 Aug 28 '13 at 06:37
  • 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 Aug 28 '13 at 06:39
  • 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 Aug 28 '13 at 06:58
  • 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 Aug 28 '13 at 07:03
  • Is there anything like any dojo library files i need to add in my project www folder. – Cyber Aug 30 '13 at 06:21
  • The error does not seem related to Dojo; again, without proper logs from LogCat, we can't know what has caused this. – Idan Adar Aug 30 '13 at 06:25
  • I tried running my application in emulator .I checked the LogCat Error ,i cant see any error registered in my application name.Emulator screen only shows black screen. – Cyber Aug 30 '13 at 06:38
  • Then the device/emulator is not connected to logcat... – Idan Adar Aug 30 '13 at 06:54
  • And also i tried a new sample application with 2 dojo text box and button.It works fine in my emulator and device.In yhis sample application i didn't add any dojo library files to my project www folder.But in my previous project i added all the dojo,dojox and digit folder to my application by replacing the folders in www. Is that the library which makes my application hang. – Cyber Aug 30 '13 at 07:09
  • Its working now.I removed all the library files from my project www folder and kept only the default files and folder that is created at the time of project creation in www folder. Anyway thanks for the valuable comments. – Cyber Sep 02 '13 at 04:13
  • Sure; please write this as an Answer to the question and mark as Answered. Thanks! – Idan Adar Sep 02 '13 at 04:24
  • please write the above an answer for all to know. Thanks. – Idan Adar Sep 05 '13 at 06:38

1 Answers1

1

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.

Cyber
  • 4,844
  • 8
  • 41
  • 61