-1

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?

Jens
  • 67,715
  • 15
  • 98
  • 113

1 Answers1

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