[android-developers] Re: getApplicationContext() returns null?
In a Service... Actually, it's WakefulIntentService, extending your
class.
I only got a single report of this failure (I use ACRA) and it's in a
commonly executed code.
On Jan 24, 8:34 am, Mark Murphy <mmur...@commonsware.com> wrote:
> Where are you executing this statement?
>
>
>
>
>
> On Mon, Jan 23, 2012 at 6:41 PM, Zsolt Vasvari <zvasv...@gmail.com> wrote:
> > Has anybody seen this happen?
>
> > I have the following line in my code:
>
> > XmlResourceParser xml =
> > getAppplicationContext().getResources().getXml(R.xml.database_tables);
>
> > Somebody reported a NPE on that line, so it can either be
> > getAppplicationContext() or getResources() returning a null. The
> > same line works for countless other users.
>
> > Anybody has any clues?
>
> > --
> > 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
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books- Hide quoted text -
>
> - Show quoted text -
--
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
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home