Google Play服务错误?

时间:2016-12-23 16:27:12

标签: android google-play-services fusedlocationproviderapi

我随机得到了这个错误(我没有更改行/行,并且在此之前确实有效):

error: cannot access AbstractSafeParcelable
class file for com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable not found

在这一行:

locationRequest.setInterval(LOCATION_REQUEST_INTERVAL);

(我在这里使用谷歌FusedLocationProviderAPI)

为什么我会收到此错误,这是什么意思?

1 个答案:

答案 0 :(得分:3)

我设法解决了这个问题。如果有人会遇到同样的错误,请尝试此操作。

我的build.gradle(app)文件中存在冲突。我有这两个:

compile 'com.google.android.gms:play-services-location:9.4.0'
compile 'com.google.android.gms:play-services-maps:10.0.1'

由于存在两个不同的版本而导致冲突。我刚刚将...services-location:9.4.0更新为...services-location:10.0.1并解决了问题。