device does not have package com.google.android.gsf in google nexus phone

developerXXX picture developerXXX · Apr 9, 2013 · Viewed 9.4k times · Source

I am testing my app in Google Nexus phone. But its force close during the start up itself with an exception "device does not have package com.google.android.gsf" Any hint?

I have successfully tested the app in Samsung Galaxy S3 and Samsung Galaxy Y phones.

Answer

ZoFreX picture ZoFreX · Jan 23, 2014

If you are making use of packages that are not part of the core Android system, your app should always check for their existence and handle the errors gracefully if they are not installed, rather than crashing. I believe this is what you are seeing - com.google.android.gsf is not part of the core Android SDK so you cannot guarantee it is available.

If you are using any functionality from Google Play Services, you should read the setup documentation which covers checking for the presence of the services, and prompting the user to download / update them if necessary.