Wednesday, February 9, 2011

[android-developers] Re: Adding a new View causing Force Close

If I comment out the OwnerScreen.setVisibility statement and leave the
findViewById statement there is no force close (of course there is no
call to the OwnerScreen object at that point, I don't understand how
it could be null though, I basically copied the statements for
MyRideScreen and the XML, I even tried pairing back the XML to bare
basics so I'm still a little bit at a loss, I have 2 views that are
built the same way and working so I'm confused as to what I'm doing
wrong, If I need to attach more complete code I can do that.

On Feb 9, 11:01 pm, TreKing <treking...@gmail.com> wrote:
> On Wed, Feb 9, 2011 at 9:44 PM, Aaron Buckner <nagm...@gmail.com> wrote:
> > When adding the OwnerScreen the OwnerScreen.setVisibility(VIS/INVIS);
> > causes a force close
> > where the MyRideScreen setup the same does not
>
> OwnerScreen is null, which means it does not exist in your main
> view hierarchy when you try to find it by ID. Make sure it does.
>
> --------------------------------------------------------------------------- ----------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

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

No comments:

Post a Comment