Google 地理围栏不起作用,总是 GEOFENCE_NOT_AVAILABLE

Google geofencing not working, always GEOFENCE_NOT_AVAILABLE

我尝试了很多天使用 Google 位置 API 在地图中定义地理围栏,我使用 Smart Location Library togheter with genymotion and Lockito for test my geofences but at the time at i start the lockito test my IntentService catchs the google geofencing event with an error code of 1000 and in the Google APIs for Android docs 这意味着 GEOFENCE_NOT_AVAILABLE 错误,我使用 genymotion 和我的 Moto G3 进行了测试,但结果相同,然后我尝试从 github 测试项目,结果也相同,我确保在我的设备中 GPS 已打开并且在最佳准确度;我尝试了以下项目,但没有任何改变错误:

额外数据:测试是在 android 6.0 的手机上完成的,我用 Google 服务 9.6.1 和 9.4.0 进行测试,结果各不相同。

我试过使用 Genymotion 模拟器,但遇到了类似的 GEOFENCE_NOT_AVAILABLE 错误。在我的特殊情况下,原因是 Google Play Services 没有安装在模拟器上。

真正的问题是使用 Lockito,您必须测试其他应用程序以在 genymotion 或真实设备中模拟位置。