Cynosure.X International LLC

: :

Add Comment | Related Links | TrackBack
Related Content

App Development: "Problem loading widget"

You're happily developing your Google Android widget. You get it compiling. Then you install it to the emulator. Now you try to add your widget to the home screen. The next thing you know, your widget shows the "Problem loading widget" message. What could it be?

The next thing you should do is to run the Dalvik Debug Monitor. Then try adding your widget to the home screen again. If you see the following error message in the log, then it's likely a resource alignment problem.

android.widget.RemoteViews$ActionException: can't find view: 0x...

The "0x..." is actually a hex value pointing to a resource. Android can't find the view resource, yet your app compiles fine. This is usually caused by ant (make utility) not realizing that one of the resource file has changed and the R.java file needs to be regenerated.

Just touch all the resource files or open them and save them again. That will indicate the files have changed to ant and force it to refresh its cache. Now compile again and your app should work.

Chieh Cheng
Sat, 28 Aug 2010 01:45:41 +0000

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 6 + 5?
Click button only once, please!

TrackBack

TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.

Products | Services
Forums | Latest | RSS
Library | Search | Wiki
Help | Licenses

Login | Register

45 Users Online

Hacking Digital Cameras
Fun for Photographers



Amazon Associate

Copyright © 1996 - 2024. All Rights Reserved.