i just learning about android programming to show map. but when i run this code ,there\'s some error. Can anybody explain why this error occurs? And what I can do to fix this pr
Above mentioned problem can occur if you have emulator or device in which google play services are not installed. I don't have perfect solution but I figured out some work around to save your app from crashing. In this case you have to follow simple steps 1. Override startActivityForResult(intent, requestcode) 2. In startActivityForResult add super call super.startActivityForResult in try catch and catch the NullPointerException
Easy its done Now you can trap the nullpointerexception here and add your error handling in catch