ARC Welder: “Device does not have package com.google.android.gsf” despite “usePlayServices”: [“gcm”]

倾然丶 夕夏残阳落幕 提交于 2019-12-31 05:21:07

问题


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?


回答1:


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).




回答2:


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

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