Can anyone help me to find out what can be the issue with this program. In the onCreate() method the findViewById() returns null for all ids and th
onCreate()
findViewById()
In my case, it was a stupid mistake on my part. I had written code in the OnCreate method but it was above the setContentView line of code. Once I moved my code below this line the application started working fine.
setContentView
setContentView(R.layout.activity_main);