Android GoogleAppClient-无法启动服务
我正在尝试从Play Services v7将LocationUpdate作为服务进行更新,但出现以下错误:Android GoogleAppClient-无法启动服务,android,google-play-services,android-service,google-api-client,Android,Google Play Services,Android Service,Google Api Client,我正在尝试从Play Services v7将LocationUpdate作为服务进行更新,但出现以下错误: Unable to start service com.package.etcetc... GoogleApiClient is not connected yet. 这是我的android清单: ... <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" a
Unable to start service com.package.etcetc... GoogleApiClient is not connected yet.
这是我的android清单:
...
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name=".LocationService"
android:enabled="true" />
</application>
...
下面是我的完整java代码:
有什么建议吗?我看不到代码的链接。这是:我看到了代码,我的问题与问题无关,但我很好奇,他们在文档中写的最小位移参数是以米为单位的距离,您的值是40,在注释中您写的是10米。。
startService(new Intent(MainActivity.this, LocationService.class));