Whenever i click on run project , it is showing me NullPointerException : null
.
I don't know what is the reason, why am i getting this?
NOTE Dont point this question as duplicate of What is a Null Pointer Exception, and how do I fix it?, because i am not getting null in any control or view or any line of code.
Edit : I am using Android Studio 1.4 with following gradle configuration :
compileSdkVersion 23
buildToolsVersion "23.0.2"
Strange I was finding for solution from more that 2 hours but solution was simple. I have tried with restarting system as well as Android Studio, but the thing which did trick for me is Invalidate and Restart
.
you can find this option from File->Invalidate caches/Restart.
This did trick for me and now its not showing error.
Strangely enough, I had the same issue, but Invalidation didn't helped. I even tried to reinstall Android Studio but it didn't help either.
Finally, I removed .idea
folder and all other files from Android studio (*.iml
) and re-imported project as a Gradle project and everything became fine.
I had Android Studio version 2.3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With