I am trying to check the availability of Google Play Services APK prior to using it. I have got a
device where the package is out of date (the log reads \
I encountered some bizarre behavior with code similar to yours when I was including the Google Play Services Library improperly in my project. You have to import as a project the google-play-services_lib
directory and you have to include google-play-services.jar in your classpath. The reason is that the project contains a bunch of resources including the ones necessary for displaying the appropriate dialog for getErrorDialog()
.