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

狂风中的少年 提交于 2019-12-21 11:56:14

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/15901007/device-does-not-have-package-com-google-android-gsf-in-google-nexus-phone

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!