Can you post a stack trace (from Android Market) and say what is the name of
a class you provided a peace of code for?
For a meantime you need to inject *Log* into your code (*onDestroy()*) to
see why you get null pointer exception. Looking at the code you posted
everything should work ok. If
I have run these code.
no error.
On Oct 8, 4:34 pm, DraganA dand...@gmail.com wrote:
I'm puzzled as to why I'm getting Null pointer exception in the
construct below, knowing the Activity life cycle, it shouldn't happen.
Could the clue be in TabActivity??
public class Main extends
I have run it too before I released my app, but still got an error
report through Developers console.
On Oct 8, 10:03 am, Goodwin purerain2...@163.com wrote:
I have run these code.
no error.
On Oct 8, 4:34 pm, DraganA dand...@gmail.com wrote:
I'm puzzled as to why I'm getting Null
Based on that, you shouldn't get a crash, but obviously that's not the full
code you are using.
Are you changing that variable at any other point in the code?
Steven
Studio LFP
http://www.studio-lfp.com
On Saturday, October 8, 2011 3:34:15 AM UTC-5, DraganA wrote:
I'm puzzled as to why I'm
That's the problem, the list is created in onCreate() method and is
not reassigned or set to null anywhere. I forgot to say, the null
pointer happens in onDestroy() method in list.clear() line. From that
I can only deduce that onDestroy() is called before onCreate()
On Oct 8, 5:42 pm, Studio LFP
That won't happen unless your user is doing something stupid, how many
of these have you had reported?
(Could this happen if someone was using instrumentation on your app?)
OnDestroy won't be called before onCreate, at least using the plan old
unmodded Android system.
Kris
On Sat, Oct 8, 2011
Without code samples, I don't think anyone is going to be able to help you
find your issue. I use this all the time and the only time I have seen it
not work was when I made a mistake somewhere else in the code.
I do usually do a null check on things in the onDestory before I use them
because
Calling finish() from onCreate still results in onDestroy getting called.
So if your onCreate calls finish() and returns -- before you initialize
the list -- perhaps as part of displaying the license agreement, or
something else along those lines -- then in onDestroy the list will
still be
My bad, I just realised I do call finish in onCreate and return before
the variable is initialised. Kostya explained most of it. Thanks.
On Oct 8, 6:30 pm, Kostya Vasilyev kmans...@gmail.com wrote:
Calling finish() from onCreate still results in onDestroy getting called.
So if your onCreate
If you download the source tree (if it ever comes back up again), I
think you might find an interesting read in the code that starts up an
application, I think ActivityThread. It's not too much code, mostly
calling instrumentation in the right places, and provides a nice read
for any systems
I should have been more clear about distinguishing between Activity
and ``app'' here..., but I think you get the idea :-)
kris
On Sat, Oct 8, 2011 at 6:37 PM, Kristopher Micinski
krismicin...@gmail.com wrote:
If you download the source tree (if it ever comes back up again), I
think you might
11 matches
Mail list logo