Search code examples
androidandroid-appwidgetappwidgetprovider

Android app widget issue on android 2.x device But works smoothly on android 4.x device?


I am trying display app widget( with configuration activity. where user can choose the category what to display on app widget). I can smoothly run the application with app widget in android 4.x device. everything works fine but when it comes to android 2.x device, there is message on screen "Problem loading gadget" instead of loading proper app widget. and i am not able to figure out what is the problem has anybody faced such kind of problem?? Help please :(

Note : Layout for app widget only use

1)RelativeLayout

2)LinearLayout

3)Imageview(which set image bitmap)

4)Textview

Library i have include SherlockActionBar 4.2, Viewpager Indicator


Solution

  • According to your question, the app widget smoothly runs in android 4.X devices but "Problem loading gadget" pops up in android 2.X devices. The problem is not in your coding part. If there was a problem in coding part then it would not run in 4.X devices as well.The appwidget is showing "Problem loading gadget" in 2.X device.So, the problem may be in designing part where you may have missed assigning some values in the layout file. Check your appwidget layout xml file properly. There might be some missing values for 2.X devices in your layouts. Such errors are not displayed in logcats but these errors are very harmful.