On Wed, Aug 11, 2010 at 3:10 AM, Scott Herbert <
[email protected]> wrote:

>  I'm new to Java (and be extension Android)
>

I highly recommend you go learn Java on it's own outside of Android. You're
trying to run before you walk and you're going to be tripping and falling
all over the place on stupid stuff.


> And here lies the problem, as soon as this class exists (the constructor is
> called) I get a runtime exception, comment it out it runs fine.
>

When posting questions about exceptions, it's usually helpful to post the
relevant code and the exception stack trace so people have a better idea of
what you're talking about.


> I think this is because the constructor is setting a String (db_path) that
> is used by onCreate, and so if onCreate is fired before the constructor it
> tries to use db_path and fails because it's not set.
>

You can easily verify this by looking at the exception and / or using the
debugger to check the value of this string in your onCreate method.

-------------------------------------------------------------------------------------------------
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 [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