In my apk running in ARC welder I get:
java.lang.UnsupportedOperationException: Device does not have package com.google.android.gsf at com.google.android.gcm.GCMRegistrar.checkDevice(GCMRegistrar.java:98)
I get this despite having the following in Additional Metadata:
{ "usePlayServices": ["gcm"], "crx_key": ... } .
What do I need to do to get this working?
Assuming you are not using the deprecated C2DM (which ARC doesn't support), a possible reason is that you are not using the right way to check GCM availability. If that's the case, please refer to the example in Implementing GCM Client on Android (search for checkPlayServices).
I had this problem, but it appears the solution had nothing to do with GCM. My app was using the RabbitMQ java library though.
The solution was to use Google APIs instead of Android SDK Platfor as the default SDK . This is selected by going to Project Settings -> Project -> Select New [under Project SDK] -> Chose Your Android SDK Home Directory -> Chose the Your Favourite Google API.
Note: the APIs, in case you downloaded them, are normally on the lower half of the Build Target Drop down list in the Create New Android SDK dialog box.
来源:https://stackoverflow.com/questions/29661576/arc-welder-device-does-not-have-package-com-google-android-gsf-despite-usepl