Question

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

Was it helpful?

Solution 2

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.

OTHER TIPS

The reason behind "Problem loading gadget" while running app widgets is 1)You are using non supporting widgets for your app widget. you can only use these widgets

 1)FrameLayout,LinearLayout,RelativeLayout,Gridlayout
 2)AnalogClock,Button,Chronometer,ImageButton,ImageView,ProgressBar,TextView,ViewFlipper,ListView,GridView,StackView,AdapterViewFlipper,Viewstub.

Note: Descendants of these classes are not supported.

2)Another reason might be the value which you are going to set on RemoteView might be unknowingly null. so you should be ware of that.

3)Another reason might be you have forgot to define values for different version, like my scenario (well explain by prativa).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top