我有一个在我的活动中动态显示的MapFragment。
但它说我必须更新Google Play服务。我已经通过更新依赖项来做到这一点,但它不起作用。
有什么想法吗?
下面是我的Gradle文件:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:support-v4:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services:10.2.0'
}
我的片段:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="ibas.locatix_teamviewer.mapFragment">
<com.google.android.gms.maps.MapView
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginTop="12dp"
android:id="@+id/mapView"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
下面是我的活动:
发布于 2017-03-13 07:30:56
您设备上的google play服务版本已过期。只需点击更新按钮,您就可以从play-store下载设备上的最新版本。
编辑: Stackoverflow上有这样的similar questions。你可能会发现这些问题和答案很有用。
根据documentation的说法,你的模拟器也应该使用Android4.2.2或更高版本。
要在使用Google Play services SDK时测试您的应用程序,您必须使用以下任一选项:
带有AVD的-The安卓模拟器,它运行基于安卓4.2.2或更高版本的Google API平台。
https://stackoverflow.com/questions/42753906
复制相似问题