Search code examples
androidadbibm-mobilefirst

IBM Worklight 5.0.6.x - Hybrid Android application can't run on real device


I have created a Worklight application with the Android environment and tried running it. It is working fine in the Android Emulator but when I try to run it in an Android device it shows an error:

The application has unfortunately stopped

Can anybody help me regarding this issue?


Solution

  • You have probably installed ADT v22. I have provided an answer for this problem in this question: worklight auto-generated android folder does not run on avd

    This happens due to a change Google has made in this version of ADT. It affects users of ADT v22 only. Worklight will have a built-in fix for this in Worklight v6.0.

    In the meanwhile, follow these instructions (on a per-project basis):

    1. Right-click on your generated Android project and choose "properties"
    2. From the left pane, choose "Java Build Path'
    3. Tick the "Android Private Libraries" checkbox
    4. Refresh the project / re-build the app

    The app should now successfully launch in the device.