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?
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):
- Right-click on your generated Android project and choose
"properties"
- From the left pane, choose "Java Build Path'
- Tick the "Android Private Libraries" checkbox
- Refresh the project / re-build the app
The app should now successfully launch in the device.