I'm new to android and I can usually find an issue already answered. But every time I the 'this' pointer in an activity's OnCreate method it crashes with Nullpointerexception. I can move the code to OnStart and everything will run fine, but I've seen people post code using it in their OnCreate method with no problems. Any ideas why this would be happening?
Asked
Active
Viewed 58 times
-1
-
Please fix your tags. – Droppy Aug 03 '14 at 13:47
-
5Add your code and the full stacktrace please. – Jens Aug 03 '14 at 13:48
1 Answers
0
make sure you set variables/call methods after calling super.onCreate(). You most probably haven't set the contentview if you are trying to interact with the view.

user3904083
- 331
- 2
- 5