2014-04-11 144 views
2

我试图在我的应用程序中实现开发人员谷歌的示例代码。无法解析符号ReceiveUpdatesIntentService

https://developer.android.com/training/location/receive-location-updates.html

我使用所有的文件,但在AndroidManifest我有最高审计机关我有错误,不能解析符号ReceiveUpdatesIntentService。代码与谷歌的zip相同。唯一的变化就是下一个。

谷歌的清单:

<service 
      android:name="com.example.android.location.ReceiveUpdatesIntentService" 
      android:label="@string/app_name" 
      android:exported="false"></service> 

我的清单:

<service 
      android:name="com.nikolay.app.ReceiveUpdatesIntentService" 
      android:label="@string/app_name" 
      android:exported="false"></service> 

我只更改包。什么是错误?

谢谢各位朋友。

回答

1

您应该将Google服务元数据添加到清单中。

<meta-data 
     android:name="com.google.android.gms.version" 
     android:value="@integer/google_play_services_version" />