Hi all,

I'm just getting into Android development, coming from a mostly ruby
and scheme with some Java background. For a first project, I decided
to try and build a stopwatch.

The included Chronometer widget doesn't quite have the functionality I
wanted, so I copied its code into my own package. However, when I try
to build it, I get the following error:

compile:
    [javac] Compiling 3 source files to /Users/daniel/Projects/
Stopwatch2/bin/classes
    [javac] /Users/daniel/Projects/Stopwatch2/src/com/
redballoonsoftware/widgets/Chronometer.java:297: cannot find symbol
    [javac] symbol  : class RemotableViewMethod
    [javac] location: package android.view
    [javac]     @android.view.RemotableViewMethod
    [javac]                  ^
    [javac] 1 error

If I remove the RemotableViewMethod annotation, the code compiles, but
crashes with an IllegalStateException  as soon as I call a method on
the widget, as seen in this stacktrace: http://www.pastebin.org/50243
.

Looking through the android source, you can see stock widgets using
the RemotableViewMethod all over the place, but for some reason, my
code can't.

So, my question is this: What can I do to enable the
RemotableViewMethod annotation in my custom widgets? Is there
something I should be doing differently in order to code custom
widgets?

I know that part of the problem is just my lack of experience with the
Android SDK, and I don't fully understand what the RemoteViews class
does or why it's needed, and the two sentence description in the API
docs doesn't help much there. If someone could explain just the
logistics of this class, that would also be helpful.

Thanks!

Daniel Bostwick

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to